Specifies the character that separates each group of three digits to the left of the decimal point when displaying a formatted numeric or currency value.
Syntax
| | Copy Code |
|---|
SET SEPARATOR TO [expC] |
Parameters
-
exprC
-
Specifies the character for the numeric place separator.
Remarks
Example
| | Copy Code |
|---|
SET SEPARATOR TO && reset to default
_Screen.AddObject("t","textbox")
_Screen.t.InputMask = "9,999.99"
_screen.t.Value = 1000
_Screen.t.Visible = .T.
WAIT WINDOW "Note the value in the textbox: looks like 1,000.00"
* now change the separator:
SET SEPARATOR TO "#"
WAIT WINDOW "Note the value in the textbox: looks like 1#000.00"
* now indicate that you want regional defaults:
SET SYSFORMATS ON
WAIT WINDOW ;
"Note the value in the textbox: looks like 1,000.00 again" ;
+ CHR(13) + ;
"because SET SYSFORMATS ON was issued."
? SET("SEPARATOR")
WAIT WINDOW ;
"Note the value of SET('SEPARATOR') now also reflects the default."
SET SEPARATOR TO "#"
WAIT WINDOW ;
"The textbox changes again." ;
+ CHR(13) + ;
"Although SET SYSFORMATS is still ON, SET SEPARATOR is more recent."
|
See Also