- Are enclosed in ${= and =} delimiters.
- May appear anywhere a variable is allowed.
- May contain the following operators:
- + - * / ^
- unary -
- cos sin tan
- ( )
- E notation, e.g., 12E+3
Given:
!define X {1}
!define Y {2}
!define Z {3} The following expressions yields 10:
${= ${X} + ${Y} + ${Z} + 4 =} Actual Markup
The result is 10?: 10 yes!
Advanced Notation
Complete Syntax
${= [% format :] expression =}
Where format is a single numeric or boolean format specifier defined by the Java Formatter class conversions.
Examples
| Mark Up | Result |
| ${=1+2+3=} | 6 |
| ${=12E+2 + 34=} | 1234 |
| ${=%03d:1+2+3=} | 006 |
| ${=%02X:10+1=} | 09 |
| ${= %02x : 10 + 1 =} | 09 |
| ${= %03.2f : 10.12345678 =} | 10,12 |
| ${=%b: 1 =} | true |
| ${=%b: 0 =} | false |
| ${=%B: 6 =} | true |
| ${=%B: -2 =} | true |
Formatting Locale
The formatting locale can be overriden by setting the FORMAT_LOCALE variable.Example
!define FORMAT_LOCALE {fr}See: <Fit Nesse .Suite Acceptance Tests .Suite Widget Tests .Test Evaluator