fn: exprtk.eval
[contents]

Contents

Syntax

The syntax for exprtk.eval calls is:

f++:  
exprtk.eval{options}()
exprtk.eval{options}(name)

n++:  
@exprtk.eval{options}()
@exprtk.eval{options}(name)

Description

The exprtk.eval function is for evaluating ExprTk expressions, it takes zero parameters and returns the current value of the most recently compiled ExprTk expression, otherwise a single parameter that should be the name of a compiled expression to return the current value of. See here for more information about ExprTk.

Options

The following options are available for exprtk.eval calls:

option description
!o do not return output
o return output
!round do not round value of ExprTk expression
option description

f++ example

Examples of exprtk.eval being used with f++:

exprtk.add_package(basicio_package)
exprtk.compile(println('hello, world!'))
exprtk.eval()

exprtk.add_package(basicio_package)
exprtk.compile(hello, println('hello, world!'))
exprtk.eval(hello)

n++ example

Examples of exprtk.eval being used with n++:

@exprtk.add_package(basicio_package)
@exprtk.compile(println('hello, world!'))
@exprtk.eval()

@exprtk.add_package(basicio_package)
@exprtk.compile(hello, println('hello, world!'))
@exprtk.eval(hello)

Sponsors