JavaScript Editor js editor     Web development 



Main Page

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

Use SET SEPARATOR to change the numeric place separator from the default, for example a comma (,). Issue SET SEPARATOR without its argument to reset the value to its default.

Tip:
If you use the command SET SYSFORMATS ON, the character for the numeric place separator is set by the Windows Regional Options Control Panel. Using this command will re-set the character to your regional default until the next time you issue a SET SEPARATOR exprC command.

SET SEPARATOR is scoped to the current data session.

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



JavaScript Editor js editor     Web development