Sign in

docs RPG Reference

Currency Symbol

Currency Symbol

A currency symbol followed directly by a first zero in the edit word (end-zero-suppression character) is said to float. All leading zeros are suppressed in the output and the currency symbol appears in the output immediately to the left of the most significant digit.

Edit WordSource DataAppears in Edited Result as:
’␢␢,␢␢␢,␢$0.␢␢‘000000012␢␢␢␢␢␢␢␢␢$.12
’␢␢,␢␢␢,␢$0.␢␢‘000123456␢␢␢␢$1,234.56

If the currency symbol is put into the first position of the edit word, then it will always appear in that position in the output. This is called a fixed currency symbol.

Edit WordSource DataAppears in Edited Result as:
’$␢,␢␢␢,␢␢0.␢␢‘000123456$␢␢␢␢1,234.56
’$␢␢,␢␢␢,0␢0.␢␢‘000000000$␢␢␢␢␢␢␢␢00.00
’$␢,␢␢␢,*␢␢.␢␢‘000123456$****1,234.56

A currency symbol anywhere else in the edit word and not immediately followed by a zero end-suppression-character is treated as a constant (see “Constants” below).