Difference between revisions of "SET()"

From Lianjapedia
Jump to: navigation, search
(Products)
 
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to check status of a set command
 
Function to check status of a set command
 
  
 
==Syntax==
 
==Syntax==
 
SET(<expC> [, <expN>])
 
SET(<expC> [, <expN>])
 
  
 
==See Also==
 
==See Also==
 
[[EXCLUSIVE()]], [[SYS()]], [[:Category:Set_Commands|SET COMMANDS]]
 
[[EXCLUSIVE()]], [[SYS()]], [[:Category:Set_Commands|SET COMMANDS]]
 
  
 
==Description==
 
==Description==
The SET() function returns .T. or .F. depending on the status of the system setting.  SET() only returns information for SET parameters which can be ON or OFF.  The character expression <expC> is the SET command keyword.  This function can be used in conjunction with the SET command to toggle the various SET COMMANDS ON and OFF.
+
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.
 
+
SET("COMPRESS") returns true if COMPRESS has been set on.
+
 
+
SET("FASTINDEX") returns true if FASTINDEX has been set on.
+
 
+
SET("FILECASE) returns true if FILECASE has been set on.
+
 
+
SET("PSHARE") returns true if PSHARE has been set on.
+
 
+
SET("NAVIGATE") returns true if NAVIGATE has been set on.
+
 
+
SET("SYSMENU") returns true if SYSMENU has been set on.  It returns "ON" or "OFF" in Xbase compatibility mode.
+
  
 
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>.
 
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==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
 
? set("safety")
 
? set("safety")
.F.
+
OFF
  
 
// Another Example
 
// Another Example
 
// toggle exclusive to the opposite setting
 
// toggle exclusive to the opposite setting
set exclusive(iif(set("exclusive"),.F.,.T.))
+
set exclusive(iif(set("exclusive")="ON",.F.,.T.))
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 08:51, 30 May 2013

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.))