Structure of expressions
Structure of expressions
Anywhere ePOS expects a parameter or value of a certain data type, xxpressions (constant, parameter, function, or formula) can be used if they return the correct data type - especially in the structure of function calls. If the data type is numerical, the result of the expression can be either an integer or a decimal.
Expression | Numerical example | String example |
<Constant> | 1 | ’green’ |
<Parameter> | Length | Customer.Name |
<Function> | f$Sqrt(Length) | f$FtoS(ColorCode) |
<Formula> | PI * r*r | Ident + ’Ex’ |
These formats can of course be freely combined and nested:
Hypotenuse= f$Sqrt(a*a + b*b)
Price = f$Round((Price + p$Surcharge(0.5*Customer.Rebate)*10)/10
The following rules apply:
Expressions should be contained in parentheses to improve the readability. ePOS works with mathematical order of operations, so
2 + 3 * 4 = 2 + (3 * 4) = 14
Spaces can be arbitrarily inserted or omitted between parameters, functions, operators, and assignments. However, no spaces are allowed within a parameter name, a function, or a multi-character operator (e.g. ">=").