User Tools

Site Tools


k19:k19.8:start

19.8.0 Eval component and Eval() function

If you turn to the subject, you will discover on the one hand the function Eval() and on the other hand the component Eval (gb.eval) with its 3 classes. The connection is not immediately obvious, but using the properties of the Expression (gb.eval) class and its Compile method accomplish the same thing as the Eval() function.

19.8.0.1 Component Eval gb.eval

You can use this component to evaluate Gambas expressions at runtime. It contains the classes:

  • Expression
  • Highlight
  • System

The description of the properties, methods and constants of the last two classes can be found in chapters 19.8.3 and 19.8.4.

19.8.0.2 Eval() function

When you call this function Eval(..) to evaluate Gambas expressions at runtime, the gb.eval component is automatically loaded:

Value = Eval ( Expression AS String [ , Context AS Collection ] ) AS Variant

Download

The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k19/k19.8/start.txt · Last modified: 21.10.2023 by emma

Page Tools