SET CURRENCY Command

Defines the currency symbol and specifies its position in the display of numeric, currency, float, and double expressions.

SET CURRENCY TO [cCurrencySymbol]
-or-
SET CURRENCY LEFT | RIGHT

Parameters

  • cCurrencySymbol
    Specifies a character string representing the currency symbol; can be one to nine characters long. Issue SET CURRENCY TO without cCurrencySymbol to reset the currency symbol to the default dollar sign ($).

    You can also specify a currency symbol using Alt+nnn. Specify the Euro currency symbol () with Alt+0128 if you have installed supporting Windows fonts. You also can set the default currency symbol in the Regional tab of the Options dialog box.

  • LEFT
    (Default) Positions the currency symbol to the left of the currency value.

  • RIGHT
    Positions the currency symbol to the right of the currency value.

Remarks

The currency symbol is displayed in output created with @ ... SAY and in text boxes created with @ ... GET when the $ code is included in the FUNCTION or PICTURE clause.

SET CURRENCY is scoped to the current data session.

Example

The following example displays the DM currency symbol on either side of the currency value. If you use PICTURE to display the currency symbol, be sure to include @ before the dollar sign.

STORE SET('CURRENCY') TO gcCurrPosit
STORE 1234.56 TO gnDollarAmnt
CLEAR
SET CURRENCY TO 'DM'
@ 2,2 SAY gnDollarAmnt PICTURE '@$99,999.99'
IF gcCurrPosit = 'LEFT'
   SET CURRENCY RIGHT
ELSE
   SET CURRENCY LEFT
ENDIF
@ 4,2 SAY gnDollarAmnt FUNCTION '$99,999.99'

See Also

SET DATASESSION | SET DECIMALS | SET SEPARATOR | SET SYSFORMATS