fn: exprtk
[contents]

Contents

Syntax

The syntax for exprtk calls is:

f++:  
`expression`
exprtk{options}(expression)
exprtk{options}
{
	//block of ExprTk code
}

n++:  
@`expression`
@exprtk{options}(expression)
@exprtk{options}
{
	//block of ExprTk code
}

Description

The exprtk function is for evaluating ExprTk expressions, it takes zero parameters with the call followed by a block of ExprTk code otherwise a single parameter that should be the expression to be evaluated. See here for more information about ExprTk.

Options

The following options are available for exprtk calls:

option description
!o do not return output
o return output
pb parse block with language call is made from before evaluating with ExprTk
option description

f++ example

Examples of cd being used with f++:

`var x:=0; nsm_write(x, endl)`
exprtk(var x:=0; nsm_write(x, endl))
exprtk.add_package("basicio_package")
exprtk
{
	for(var x:=0; x<10; x+=1)
	{
		println("x: ", x);
	}
}

n++ example

Example of cd being used with n++:

@`var x:=0; nsm_write(x, endl)`
@exprtk(var x:=0; nsm_write(x, endl))
@exprtk.add_package("basicio_package")
@exprtk
{
	for(var x:=0; x<10; x+=1)
	{
		println("x: ", x);
	}
}