Share via


SET( ) Function

Returns the status of various SET commands.

SET(cSETCommand [, 1 | cExpression | 2 | 3 | 4])

Return Values

Character, Numeric

Parameters

  • cSETCommand
    A character expression specifying the SET command for which you want information returned. The current setting of the specified command is returned as a character or numeric string.

  • 1 | cExpression | 2 | 3
    Specifies that additional information about a SET command be returned. 1 and cExpression are identical; cExpression can be any expression that evaluates to a character type value.

    Including an argument doesn't return additional information for all SET commands, just those listed with 1, 2, or 3 in the following table.

    SET command Value returned
    ALTERNATE ON or OFF
    ALTERNATE, 1 FileName
    BELL, 1 cWAVFileName
    CENTURY ON or OFF
    CENTURY, 1 nCentury
    CENTURY, 2 ROLLOVER nYear
    CENTURY, 3 System Regional Calendar setting
    CLOCK ON or OFF
    CLOCK, 1 nRow and nColumn
    COMPATIBLE ON or OFF
    COMPATIBLE, 1 PROMPT or NOPROMPT
    COVERAGE, 1 FileName
    CURRENCY LEFT or RIGHT
    CURRENCY, 1 cCurrencySymbol
    DATE AMERICAN, ANSI, BRITISH/FRENCH, GERMAN, ITALIAN, JAPAN, USA, MDY, DMY, or YMD
    DATE, 1 Date Ordering:0 – MDY1 – DMY2 – YMD
    DELIMITERS ON or OFF
    DELIMITERS, 1 cDelimiters
    EVENTTRACKING ON or OFF
    EVENTTRACKING, 1 FileName
    FIELDS ON or OFF
    FIELDS, 1 FieldName1, FieldName2, ...
    FIELDS, 2 LOCAL or GLOBAL
    HELP ON or OFF
    HELP, 1 cFileName
    HELP, 2 cCollectionURL
    HELP, 3 SYSTEM
    KEY eExpression2, eExpression3
    KEY, 1 eExpression2
    KEY, 2 eExpression3
    MESSAGE nRow
    MESSAGE, 1 cMessageText
    MOUSE ON or OFF
    MOUSE, 1 nSensitivity
    PRINTER ON or OFF
    PRINTER, 1 FileName or PortName
    PRINTER, 2 Default Windows printer name
    PRINTER, 3 Default Visual FoxPro printer name(specified in the Visual FoxPro Print or Print Setup dialog boxes)
    REFRESH nSeconds1
    REFRESH, 1 nseconds2
    RESOURCE ON or OFF
    RESOURCE, 1 FileName
    TALK ON or OFF
    TALK, 1 WINDOW, NOWINDOW or WindowName
    TEXTMERGE ON or OFF
    TEXTMERGE, 1 cLeftDelimiter and cRightDelimiter
    TEXTMERGE, 2 cFileName
    TEXTMERGE, 3 SHOW/NOSHOW
    TEXTMERGE, 4 Evaluate source of TEXT ENDTEXT call and return stack level.
    TOPIC cHelpTopicName | lExpression
    TOPIC, 1 NContextID

Remarks

SET( ) recognizes the four-character abbreviation for all Visual FoxPro SET keywords (with the exception of HELPFILTER, which can be abbreviated to five characters). For example, STAT and PRIN can be used for SET STATUS and SET PRINTER, respectively.

The SET( ) function is identical to SYS(2001).

SET("CENTURY", 3) passes a Calendar value of 2 (Gregorian (U.S.)) in a call to the Windows GetCalendarInfo( ) API.

See Also

DISPLAY STATUS | LIST | SET | SYS(2001) – SET ... Command Status