Home / lang / eval 
Previous  Next  Edit  Rename  Undo  Refresh  Search  Administration   
fr  de  es  it  nl  pl  pt  pt_BR  ca  ar  fa  vi  ja  ru  zh  zh_TW  eo 
Documentation
History
 
Eval
Syntax
Value = Eval ( Expression AS String [ , Context AS Collection ] ) AS Variant

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.

Examples

DIM Context AS New Collection

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

PRINT Eval("X * Len(Y)", Context)

12

See also

gb.eval