Math expression script engine.
ScriptEngine
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| setSymbol | 1 | var x = 100 const x = 100 |
| setFunction | 3 | func add(x, y) x+y |
| Shell | 1 | Run the simple script that stores in the ScriptEngine.Scripts table. |
| Evaluate | 1 | ScriptEngine.Shell()) function name alias. |
| SetVariable | 1 | Set variable value |
| ParseExpression | 1 | Parse the given expression string as the math expression |
| CheckFormulaDependency | 1 | check of the formula symbol dependency and sort the formulas in asc order by dependency list |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| Expression | 1 | The default expression engine. |
| StatementEngine | 1 | all of the commands are stored at here |
| Scripts | 1 | Lambda expression table. |
04 Members
String)var x = 100 const x = 100
| Name | Type | Description |
|---|---|---|
run | String | - |
String)func add(x, y) x+y
| Name | Type | Description |
|---|---|---|
run | String | - |
String)func add(x, y) x+y
| Name | Type | Description |
|---|---|---|
run | ExpressionEngine | - |
String, String(), String)| Name | Type | Description |
|---|---|---|
name | String | function name |
args | String() | parameter names |
expr | String | function body, the math expression |
String)Run the simple script that stores in the ScriptEngine.Scripts table.
| Name | Type | Description |
|---|---|---|
statement | String | - |
String, Boolean)ScriptEngine.Shell() function name alias.
| Name | Type | Description |
|---|---|---|
statement$ | String | - |
String, String)Set variable value
| Name | Type | Description |
|---|---|---|
name | String | - |
expr | String | - |
String, Boolean)Parse the given expression string as the math expression
| Name | Type | Description |
|---|---|---|
expression | String | - |
throwEx | Boolean | throw exception if the parser error occured. |
this function will returns nothing if the expression parser error and also not throw exception
Dictionary(Of String, Expression), Index(Of String))check of the formula symbol dependency and sort the formulas in asc order by dependency list
| Name | Type | Description |
|---|---|---|
formulas | Dictionary(Of String, Expression) | a collection of the symbol value assigned expression: [symbol <- expression] |
ignores | Index(Of String) | - |
the given formula dependency result list is sorted via the dependency order
The default expression engine.
all of the commands are stored at here
.quit for do nothing and end of this program.
Lambda expression table.