Calling consecutive variables into Maple from MapleTA

  • I have some variables in MapleTA incrementally named:

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

    #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.

    for i from 1 to $numOFdefinedANSWERS do
    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...

    for i from 1 to $numOFdefinedANSWERS do
    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.

    for i from 1 to $numOFdefinedANSWERS do
    end do;

  • Thank-you for the response.  I am not wanting to call the variables into Maple until desired (in other words not all together at the start).

    The reasoning is User A might only have 3 defined answers to the particular question while user B might have 7 defined answers.  I was hoping the for loop would gradually gather all the answers rather than having them defined at the start of the call to maple.


Log in to reply