# Calling consecutive variables into Maple from MapleTA browsing

• I have some variables in MapleTA incrementally named:

----------------The below can be copied into MapleTA---------------

$numOFdefinedANSWERS=3;$Answer1=4;
$Answer2=7;$Answer3=15;
#etc....  this list can go on to an undetermined length, dependent on the person building the question (if more answers are added then the user will increment numOFdefinedANSWERS accordinginly)
#From here I am hoping to build a Maple call-out that will build an array of these MapleTA variables.  At this point I am simply hoping to attain the last variable in the loop, from there I will build the array.

$maplecall=maple(" restart: for i from 1 to$numOFdefinedANSWERS do
a:=$Answer||i end do; "); #Presently this call out seems to completely ignore the dollar sign... as "Answer3" is sent back to MapleTA, when I would like "15" sent back to TA. #I tried to modify using this callout...$MAPLE_call=maple("
restart;
with(StringTools);
for i from 1 to $numOFdefinedANSWERS do a:=cat(Char(36),Answer,i) end do; "); # This Generates a string sent back to MapleTA, that a parse seems to not handle well either? #Any ideas are appreciated? • I'm not sure if this is acceptable in your implementation, but moving the variables inside the Maple call works. The reason is that (unfortunately) the dollar sign has a different meaning in Maple. $MAPLE_call=maple("
C:=Array([]):
for i from 1 to \$numOFdefinedANSWERS do
");