Other Language Features
Expression Syntax: Language Features
The DPL expression system supports the use of arrays and if-then-else statements to create expressions not otherwise available. It also provides a special Digital Process Logic TestTable query to create sample data for testing.
Arrays
An array takes a list of scalar data values and produces a corresponding vector. This features allows you to create vector types manually.
| Expression | Result |
|---|---|
Array(“a”, “b”, “c”) | a b c |
Array(1,2,3) | 1 2 3 |
If-Then-Else
You can apply simple logic to expressions using if-then-else. The syntax takes the form: if(condition, value if true, value if false).
| Expression | Result |
|---|---|
If (Array(1,2,3)=2, "Yes", "No") | No Yes No |
FusionTestTable
In order to provide sample data for testing, you can use FusionTestTable like a query (e.g. [[FusionTestTable]]) to create a table of sample data that includes all data types (integer, string, etc.).