Forum archive 2000-2006

Barbra Bannon - unordered_str_cmp depreciated method?

Barbra Bannon - unordered_str_cmp depreciated method?

by Arnold Pizer -
Number of replies: 0
inactiveTopicunordered_str_cmp depreciated method? topic started 3/19/2003; 11:57:03 AM
last post 3/19/2003; 2:32:25 PM
userBarbra Bannon - unordered_str_cmp depreciated method? blueArrow
3/19/2003; 11:57:03 AM (reads: 754, responses: 1)
Hi there,

For some reason when I try to use unordered_str_cmp in my problems, it pops up a pink screen stating that I have an uninitialized value in str_cmp. However, my code works fine when I use just str_cmp. I have attached the code, if someone could help me, I would be forever thankful!

-Barbra

#DESCRIPTION
#KEYWORDS('derivatives', 'differentials')
#ENDDESCRIPTION



DOCUMENT(); # This should be the first executable line in the problem.



loadMacros(PG.pl,
PGbasicmacros.pl,
PGchoicemacros.pl,
PGanswermacros.pl,
PGauxiliaryFunctions.pl);



TEXT(&beginproblem);
$showPartialCorrectAnswers = 1;



TEXT(EV2(<<EOT));
$PAR
Please refer to graph for problem #3 in Stewart 4th Edition, page 230.
$PAR
For each of the numbers a,b,c,d,e,r,s, and t, state whether the function
whose graph is shown has an absolute maximum or minimum, a local maximum
or minimum, or neither a maximum or minimum.
$PAR



The following abbreviations will be used in this problem:
$PAR
MAX = absolute maximum, $BR
MIN = absolute minimum, $BR
LMAX = local maximum, $BR
LMIN = local mimimum, $BR
NONE = no maximum or minimum. $PAR



$SOL $PAR
Enter the points where the following condition holds true: (e.g. MAX: a,b)
$PAR
MAX: {ans_rule(10)} $BR
MIN: {ans_rule(10)} $BR
LMAX: {ans_rule(10)} $BR
LMIN: {ans_rule(10)} $BR
NONE: {ans_rule(10)} $BR



EOT
$a = "b";
$b = "d";
$c = "b,e";
$d = "d,s";
$e = "a,c,r,t";



ANS(unordered_str_cmp($a), unordered_str_cmp($b),
unordered_str_cmp($c), unordered_str_cmp($d),
unordered_str_cmp($e));



ENDDOCUMENT(); # This should be the last executable line in the problem.

<| Post or View Comments |>


userMike Gage - Re: unordered_str_cmp depreciated method? blueArrow
3/19/2003; 2:32:25 PM (reads: 951, responses: 0)
Hi,

This code works here on my machine. There is one problem with the answers you have

 

 $a = "b"; 
$b = "d";
$c = "b,e";
$d = "d,s";
$e = "a,c,r,t";

You do not need or want the commas in your answers. The answers are expected to be entered without commas.

You might want to get a fresh copy of PGanswermacros.pl at http://webwork-db.math.rochester.edu/cgi-bin/cvsweb.cgi/webwork/system/courseScripts/PGanswermacros.pl

just in case there is something that wasn't quite up to date in your version of str_cmp. (the error sounds very much like it is internal to str_cmp or it's alias unordered_str_cmp)

Hope this helps.

-- Mike

<| Post or View Comments |>