Eval
Revision as of 12:21, 6 July 2013 by imported>QQuix (Oooops. forgot to add what I intended in the first place)
< [[::Category:Functions|Category:Functions]]
A function added by the Oblivion Script Extender.
Syntax:
(bool) Eval expression
Eval is used within if statements to test the value of an expression. This allows OBSE expressions to be used as conditions. The expression must evaluate to a boolean value.
Example
if eval (array[0] > 1) ; code executes if array[0] > 1 endif
Notes
When used to compare ref variables, Eval accepts the "==" or "!=" operators and does not accept the "<" or ">" operators
ref MyRef . . . if eval MyRef == 0 ;<< OK ... elseif eval MyRef != 0 ;<< OK ... elseif eval MyRef > 0 ;<< Compile error: Invalid operands for operator > ... elseif eval MyRef < 0 ;<< Compile error: Invalid operands for operator < ... endif