Thanks,
Mary Cameron
DOCUMENT();
loadMacros(
"PG.pl",
"PGbasicmacros.pl",
"PGchoicemacros.pl",
"PGanswermacros.pl",
"PGauxiliaryFunctions.pl",
"MathObjects.pl",
"unorderedAnswer.pl", # DOESN"T APPEAR TO WORK in all instances
);
TEXT(beginproblem());
Context()->variables->add(y=>"Real");
$h = 1;
$k = 2;
$ansa = Compute("x-$h")->reduce();
$ansb = Compute("y-$k")->reduce();
$three = Compute("3");
$four = Compute ("4");
Context()->texStrings;
BEGIN_TEXT
$BR Enter 3 and 4 in any order \{ ans_rule(4) \} \{ ans_rule(4) \}
$BR Enter $ansa and $ansb in any order \{ ans_rule(4) \} \{ ans_rule(4) \}
END_TEXT
### conclusion -- only the last unorderedAnswer pair seems to work:
Context()->normalStrings;
UNORDERED_ANS($three->cmp(), $four -> cmp() );
UNORDERED_ANS( $ansa->cmp(), $ansb->cmp() );
ENDDOCUMENT();