[LON-CAPA-users] Variable names in formula response
Guy Albertelli II
Thu, 14 Dec 2006 13:27:23 -0500 (EST)
> Are numbers allowed in variable names in formula response (e.g. X1)?
> My colleague tells me it used to work in the past, but doesn't work
I don't remeber explicitly thinking about this, but my internal
assumption had been no.
2.2 introduced the ability for students to enter
Rather than having to do x*(3+4*x)
This would have caused the breakage your collegue is seeing.
Since the current code does require predeclaration of the variables
for sampling we could improve the code to be better about guessing
where * are implied.
But we are working on integrating maxima to support not having to do
sampling. Maxima though still requires * to appear when needed so we
were expecting to still do the implict multiplication processing, but
this would be in an environment we weren't expecting to do variable
So ways forward I see
1) disallow variables that confuse us easily ( "X1" "sin" )
2) allow most anything as a variable, but require predecleration of
the varialbes students would enter.