Number formatting
Padding
Padding is controlled by adding a parameter that begins with either WIDTH= (to control the minimum number of digits), and/or PADDING= which changes the default padding character from zero to some other character, e.g. space. For example:
| Number | Parameter | Result |
|---|---|---|
| 42 | (none) | 42 |
| 42 | WIDTH=5 | 00042 |
| 42 | WIDTH=5;PADDING=␣ | ␣␣␣42 |
Number to text conversion
The format used to convert a number to a text can be changed by adding a parameter that starts with FORMAT=. The following formats are built in, but more formats can be created by the user:
| Format | Description |
|---|---|
alpha | Alpha encoding using capital letters. Exactly the same as #ABCDEFGHIJKLMNOPQRSTUVWXYZ |
shortmonth | Translates numbers 1-12 into an English three capital letter month name. (JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC) |
shortweekday | Translates numbers 1-12 into an English three capital letter week day name. (MON, TUE, WED, THU, FRI, SAT, SUN) |
y Additionally, the following special formats are available, determined by the special first character of the format:
| First character | Format | Description |
|---|---|---|
{ | {word1,word2,...} | Use a lookup table. The words are separated by semicolon (;), plus a closing brace at the end. For example:
If the first word starts with
|
# | #numerals | Use numerals instead of standard numerals 0-9. For example:
|