Eval

Variant = Eval ( Expression [ , Context ] )

Evaluates an expression and returns its value. This expression can use almost all operators and subroutines of GAMBAS.

The optional context is a collection that must contain the value of each undefined symbol of Expression .

Example :

DIM Context AS New Collection

Context["X"] = 2
Context["Y"] = "Gambas"

PRINT Eval("X * Len(Y)", Context)
=> 12


Referenced by :