User Tools

Site Tools


Action disabled: revisions
syntax:functions:eval

Eval(text_expression)

Category: Special function


Description

This function evaluates the text_expression argument as an EasyMorph expression.


Use cases

This function makes it possible to define EasyMorph expressions externally using parameters.


Arguments

ArgumentTypeDescription
text_expressionTextAn expression in text format to be evaluated.

Return value type: Any (The type of the expression output)


Remarks

The argument itself must not be an expression with a reference to column.


Examples

  eval('1+1')  //Returns 2
  
  eval('1' & '+1')  //Returns 2
  
  eval('max(1,2)')  //Returns 2
  
  eval('[Count]+1')  //Evaluated as [Count]+1
  
  eval([Count] & '+1')  //Invalid! Column references are not allowed in argument expressions.
  
  eval({Param1})  //Parameter references to expressions in text format are allowed.
  
  eval("1+" & "eval('1+1')")  //Returns 3  (Nesting eval() is allowed.)
syntax/functions/eval.txt · Last modified: 2021/09/13 21:03 by craigt