eval()

Function groupExecute on clientPlatform(s)
GeneralNOAll

Syntax

eval(string)

Description

Evaluates a calculation expressed as a character string and returns the result

For example, if lVar2 contains the string '3*4/2', eval(lVar2) returns the result 6. You should use this function with extreme care because a runtime error will occur if the string is not a valid calculation. You can use the command Test for valid calculation to test a string before attempting to evaluate it.

Example

Calculate
 
lVar2
 as 
'3*lVar1/15.5'

Test for valid calculation
 
eval
(
lVar2
)

If flag true
  
Calculate
 
lTax
 as 
eval
(
lVar2
)

End If