Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can use the following API to evaluate an expression. 

Code Block
languagetext
object ALH.evaluate(String "expression")
object ALH.evaluate(String "language", String "expression")

The following code fragment shows how to evaluate expressions in ALH API.:

Code Block
languagetext
result = ALH.evaluate("a+b");
result = ALH.setValueevaluate($context$"Python", "display", result);a+b")

If no language is defined, the default language will be used (JavaScript Rhino).

Note

The following scripting languages are available by default:

  • BeanShell Engine [beanshell, bsh]
  • Built-in Math [Built-in Math, math, Math Engine, math engine, built-in]
  • Groovy Scripting Engine [groovy, Groovy]
  • JEXL Engine [JEXL, Jexl, jexl, JEXL2, Jexl2, jexl2]
  • JavaScript Rhino [rhino, rhino-nonjdk, js, JavaScript, javascript, ECMAScript, ecmascript, JavaScript Rhino]
  • jython [python, jython]