From e672d422d902119f05f58165c735eb82bfab6adc Mon Sep 17 00:00:00 2001 From: Paul Vojta Date: Tue, 16 Aug 2022 18:32:24 -0700 Subject: [PATCH 1/3] Fix bug: "my $xtail;" declared twice --- OpenProblemLibrary/macros/FortLewis/VectorField2D.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenProblemLibrary/macros/FortLewis/VectorField2D.pl b/OpenProblemLibrary/macros/FortLewis/VectorField2D.pl index 23cbf5d5a2..0f13640ab6 100755 --- a/OpenProblemLibrary/macros/FortLewis/VectorField2D.pl +++ b/OpenProblemLibrary/macros/FortLewis/VectorField2D.pl @@ -53,7 +53,6 @@ sub VectorField2D { my $FX; my $FY; my $xtip; -my $xtail; my $xstem; my $ystem; my $xmidtip; @@ -108,4 +107,4 @@ sub VectorField2D { } -1; \ No newline at end of file +1; From 06293ca96aed172199f4e8f6b1c5fb7e3731f5b2 Mon Sep 17 00:00:00 2001 From: Paul Vojta Date: Tue, 16 Aug 2022 18:34:59 -0700 Subject: [PATCH 2/3] Remove functions max and min (they're already defined by loading PGstandard.pl). --- .../macros/Alfred/Alfredmacros.pl | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/OpenProblemLibrary/macros/Alfred/Alfredmacros.pl b/OpenProblemLibrary/macros/Alfred/Alfredmacros.pl index 3a9ce4fbd7..239ca04c02 100755 --- a/OpenProblemLibrary/macros/Alfred/Alfredmacros.pl +++ b/OpenProblemLibrary/macros/Alfred/Alfredmacros.pl @@ -27,20 +27,22 @@ sub inversetrig } ## Compute the max and min of an array of numbers -sub max { -my $maximum = shift @_; -foreach(@_){ - if ($maximum < $_){$maximum = $_}; -}; -return $maximum; -} -sub min { -my $minimum = shift @_; -foreach(@_){ - if ($minimum > $_){$minimum = $_}; -}; -return $minimum; -} +## Deleted (max and min are provided by PGauxiliaryFunctions.pl, +## which is loaded by PGstandard.pl in every problem). +#sub max { +#my $maximum = shift @_; +#foreach(@_){ +# if ($maximum < $_){$maximum = $_}; +#}; +#return $maximum; +#} +#sub min { +#my $minimum = shift @_; +#foreach(@_){ +# if ($minimum > $_){$minimum = $_}; +#}; +#return $minimum; +#} From ffcb631b099796cadd416c40a2cd749bf77cc3de Mon Sep 17 00:00:00 2001 From: "K. Andrew Parker" Date: Fri, 19 Aug 2022 11:06:38 -0400 Subject: [PATCH 3/3] Delete redundant subroutines --- OpenProblemLibrary/macros/Alfred/Alfredmacros.pl | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/OpenProblemLibrary/macros/Alfred/Alfredmacros.pl b/OpenProblemLibrary/macros/Alfred/Alfredmacros.pl index 239ca04c02..de0871b50a 100755 --- a/OpenProblemLibrary/macros/Alfred/Alfredmacros.pl +++ b/OpenProblemLibrary/macros/Alfred/Alfredmacros.pl @@ -27,22 +27,6 @@ sub inversetrig } ## Compute the max and min of an array of numbers -## Deleted (max and min are provided by PGauxiliaryFunctions.pl, -## which is loaded by PGstandard.pl in every problem). -#sub max { -#my $maximum = shift @_; -#foreach(@_){ -# if ($maximum < $_){$maximum = $_}; -#}; -#return $maximum; -#} -#sub min { -#my $minimum = shift @_; -#foreach(@_){ -# if ($minimum > $_){$minimum = $_}; -#}; -#return $minimum; -#}