LCB: How to evaluate an expression
Posted: Wed Dec 23, 2020 1:55 pm
Sorry, I am back with a newbie question.
Right now, I am trying to make an expression work. This could be an `eval` in web.
In Livecode Script, I could easily use `value` handler like this:
But how can I do this in LCB? Here's what I tried:
Right now, I am trying to make an expression work. This could be an `eval` in web.
In Livecode Script, I could easily use `value` handler like this:
Code: Select all
put "10 * 20" into tExpression
answer the value of tExpression
Code: Select all
public handler testEval() returns Number
variable tExpression as String
put "10 * 20" into tExpression
return the value of tExpression //won't work
//return the value of tExpression parsed as number //won't work
end handler