SET()

From Lianjapedia
Jump to: navigation, search

Purpose

Function to check status of a set command

Syntax

SET(<expC> [, <expN>])

See Also

EXCLUSIVE(), SYS(), SET COMMANDS

Description

The SET() function returns ON or OFF depending on the status of the system setting. The character expression <expC> is the SET command keyword. This function can also be used in conjunction with the SET command to toggle the various SET COMMANDS ON and OFF.

If the optional <expN> is included and is greater than zero (0), additional information is returned for those set commands that have more than one setting. For example, the SET ALTERNATE command has two settings: SET ALTERNATE ON/OFF and SET ALTERNATE TO <filename>.

Example

? set("safety")
OFF
 
// Another Example
// toggle exclusive to the opposite setting
set exclusive(iif(set("exclusive")="ON",.F.,.T.))