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++:

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

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

n++ example

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

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

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