You can use the following API to evaluate an expression
ALH.evaluate("expression") ALH.evaluate("language", "expression")
The following code fragment shows how to evaluate expressions in ALH API:
result = ALH.evaluate("a+b"); result = ALH.evaluate("Python", "a+b")
If no language is defined, the default language will be used (JavaScript Rhino).
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]