Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
An expression that contains the new currency symbol to be used when decimal data is transferred to an alpha variable. If currency is longer than one character, only the leftmost character is used. (a)
The MONEY subroutine changes the dollar‑sign formatting character ($) to another character.
You can change the dollar sign used in explicit decimal to alpha formatting to any ASCII character. However, to avoid confusion, we recommend that you don’t substitute another standard formatting character for the dollar sign: Don’t use a comma (,), period (.), asterisk (*), hyphen (‑), or the uppercase letters X or Z.
The designated currency symbol remains in effect until you execute another MONEY subroutine or until the program terminates.
The MONEY subroutine is provided for compatibility only. We recommend you use the LOCALIZE subroutine, which allows full customization of numeric‑to‑alpha formatting behavior without changing the format string.
The following example converts the dollar sign to a British pound sign.
.define TTCHN ,1 record price ,a10
proc open(TTCHN, o, "tt:") xcall money('£') price = 99.99, "£££,£££.££" display(TTCHN, "Price in pounds: ", price) stop