[Aimmath-developers] Variables in AiM
Brought to you by:
gustav_delius,
npstrick
From: Dr GW D. <gw...@yo...> - 2003-07-04 17:07:33
|
Our week of learning how to writing AiM questions has just come to an end. From now on the students will be working on their own. We have had a lot of difficulties with the way AiM handles variables. The problem is that we do not have enough information on what logic AiM follows. For example I had expected both of the following two questions to print out a matrix. However the first one prints P whereas the second prints a matrix. Why is that? t> matrix problem s> [ proc(ans) P:=matrix(2,2,[1,2,3,4]); `aim/t`("Here should be a matrix: $$@P@$$");1 end proc,1] end> t> matrix problem h> P:=matrix(2,2,[1,2,3,4]); s> [ proc(ans) `aim/t`("Here is a matrix: $$@P@$$");1 end proc,1] end> If the second version had not printed P I would have put it down to P having been implicitly declared local to the procedure. But it is the first version that does not print P even though it is defined just in the previous line. The week was very exhausting because every few minutes another student came with a similar riddle and we had to experiment until we found something that worked. It would be extremely useful to us if someone could explain to us how things should work. Gustav |