Expression

    Category: Core

    A class that stores an expression you can execute.

    An expression can be made of any arithmetic operation, built-in math function call, method call of a passed instance, or built-in type construction call.

    In the following example we use a node to write our expression and show the result.

    • Variant execute ( inputs=[ ], Object base_instance=null, show_error=true )

    Executes the expression that was previously parsed by parse and returns the result. Before you use the returned object, you should check if the method failed by calling .

    If you defined input variables in parse, you can specify their values in the inputs array, in the same order.



    • has_execute_failed ( ) const

    Returns if execute has failed.


    • parse ( String expression, input_names=PoolStringArray( ) )

    Parses the expression and returns a Error.

    You can optionally specify names of variables that may appear in the expression with , so that you can bind them when it gets executed.