Expression (gb.eval)

This class represents a dynamic Gambas expression.

You can inherit this class to customize the syntax analyzer, by reimplementing the GetValue, IsIdentifier and IsSubr methods.

Esta clase es instanciable.

Métodos estáticos
IsIdentifier   Return if a specific Symbol is an identifier.
IsSubr   Return if a specific Symbol is a subroutine.

Environment   Gets or sets the collection used for getting the value of the undefined symbols in the expression.
Text   This is the text of the expression.
Value   Gets the computed value of the expression.

Compile   Compiles the expression.
GetValue   Return the value of the given Symbol.


Use "gb.eval"

Dim Expr as New Expression
Expr.Text = "21+58=79"
Print Expr.Value