Evaluation expressions

The eval() expression evaluates Gosu source at run time, which enables dynamic execution of Gosu source code. Gosu executes the source code within the same scope as the call to eval().

Syntax

eval(Expression)

Examples

Expression

Result

eval( "2 + 2" )

4

eval( 3 > 4 ? true : false )

false