How to Evaluate Math Expression Stored As Text

A

Altemir

I have a text form control whose values contain mathematical
expressions. For example, the control might contain the string value
"2*4+6". Is there an easy way to evaluate this value mathematically
and display the result (e.g., "14") in another form control?
 
A

Allan Murphy

Altemir

You can use the eval function in the afterupdate event of the input field.

result_field=eval(me!input_field)
 
Top