The format for an expression can be customized by preceding the expression with an optional format specification. The format specification is separated from the expression by a colon :.
LTDUP|Format|Factor
where:
L stands for Leading zeros.
T stands for Trailing zeros.
D stands for Decimal point.
U stands for Unsigned value.
P stands for Plus sign.
Format specifies the number of digits, for example 3.4.
Factor specifies the multiplier, for example 1.0.
Expression |
Result |
---|---|
[D|3.4|1.0:10] |
10.0 |
[D|5.4|1.0:10] |
10.0 |
[LD|3.4|1.0:10] |
010.0 |
[LP|3.0|1.0:10] |
+010 |
[PT|3.1|1.0:10] |
+100 |
When no format specification is given and there is no colon specified, XBUILD automatically uses the format of the numeric reserved word within the square brackets. For example, [<X-COORD>+1] is printed in the default format for the <X-COORD> reserved word as configured in the Words Info dialog. If there are no reserved words, such as in the expression [1+2], the default format for the <Z-COORD> reserved word is used.