DOLLAR-SYMBOL
You should no longer use this command because it may be discontinued in a future release. To use the newer SQR functionality, use ALTER-LOCALE.
Syntax
Use this syntax:
DOLLAR-SYMBOL new_symbol
Description
Redefines the currency symbol within numeric edit masks .
The dollar sign ($) is the default currency symbol for coding edit masks in the program that prints on report listings. DOLLAR-SYMBOL provides a way to change that symbol for both the edit mask and for printing.
To change the symbol that prints on the report, use MONEY-SYMBOL in the PROCEDURE section. Use DOLLAR-SYMBOL and MONEY-SYMBOL together to configure SQR programs and the reports that they produce.
Use this command only in the SETUP section.
Note:
The MONEY-SYMBOL command has the same effect as these options of the ALTER-LOCALE command: MONEY-SIGN and MONEY-SIGN-LOCATION=LEFT.
The following table lists the characters that DOLLAR-SYMBOL cannot take:
| Type | Character |
|---|---|
|
Numbers |
0 8 9 |
|
Alphabetical |
b e n r v B E N R V |
|
Symbols |
. , - + ! * _ ` < > ( ) |
Parameters
| Field or Control | Description |
|---|---|
|
new_symbol |
Specifies a new, single character to be used in edit masks instead of the dollar sign ($). |
Example
For example:
begin-setup
dollar-symbol £ ! Define £ as the currency symbol
end-setup
begin-procedure
...
print #amount () edit £££,999.99
...
end-procedure
In the previous example, if you used the dollar sign in the edit mask after defining the dollar symbol as £, the following error message appears:
Bad numeric 'edit' format: $$$,999.99
See the ALTER-LOCALE command for a description of other locale-specific parameters.