Skip to content

SET CMASK

Change Foreign Currency Parameters

This directive assigns foreign currency parameters.

SET CMASK currency-parms [,ERR=line-ref|,ERC=error-code]
currency-parms
is a string that represents the new foreign currency parameters.
line-ref
is the program line number or label to branch to if an error is produced.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.

This directive is generally available starting with release level 8.2.

Valid currency parameters are as follows:

.=,

$=parm

parm
is a string of up to 8 characters that is substituted for dollar signs.

Specifying “. = ,” reverses periods and commas in numeric values.

Specifying a null string for the currency parameters re-loads the default parameters.

Specifying multiple currency parameters that are not separated by a ‘|’ results in an ERR=17.

Specifying an invalid currency parameter results in an ERR=17.

Starting with release level 8.6, the Euro ( €, $80$ ), Pounds ( £, $A3$ ) and Yen ( ¥, $A5$ ) currency symbols may be specified as a valid currency parameter.

SET CMASK ". = ,"

reverses periods and commas in numeric values.

SET CMASK "$ = YEN "

replaces $’s with “YEN” in numeric values.

SET CMASK ". = , | $ = #"

reverses periods and commas in numeric values and substitutes $’s with #’s.

SET CMASK ". = . | $ = $"

reloads the default parameters.

SET CMASK " "

has the same result as the previous example, the default parameters are reloaded.

SET CMASK "$=€"
PRINT STR(1234567:"$###,###,##0")

replaces $’s with the Euro currency symbol ( € ) in numeric values and produces “ €1,234,567”

SET CMASK "$="+$A3$
PRINT STR(1234567:"$###,###,##0")

replaces $’s with the Pounds currency symbol ( £ ) in numeric values and produces “ £1,234,567”

SET CMASK "$=¥"
PRINT STR(1234567:"$###,###,##0")

replaces $’s with the Yen currency symbol ( ¥ ) in numeric values and
produces “ ¥1,234,567”

CMASK system variable

From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF