Explore the community Forums Lectora Lectora Questions & Answers Adding numeric variables in Lectora Reply To: Adding numeric variables in Lectora

#390867 Score: 0
Profile photo of Jeffry Gordon
Jeffry Gordon
lab member
LUC16 Attendee
LUC17 Attendee
curious george
wise owl
1 pt

Thank you, both of you, Erica and Tim, that did it. I forgot that all math ops are binary and must be done in individual actions. I had hoped I could do a math op in the value box but evidently you cannot.

This is kind of sucky though..my actual formula was nastier, something like A+B*C+D*E, and I didn’t want the original results of A, C, and E destroyed.  I then had to create 2 new variables: prodBC and prodDE.

Now I had to create an action to make prodBC=C and another action to make prodDE=E

Then I had to create a new action to make prodBC*B and another to make prodDE*D

I then had to add things two at a time. I created a new variable TOTALscore and then created an action that made that equal to A. I then created a new action to take TOTALscore and add to it prodBC. I then had to make a final action to take TOTALscore and add it to prodDE.

This is just nasty.  I ought to have a single line where I can put  in the var names (surrounded each by VAR and parens and have it then interpret that result.