Introduction
In this chapter, the group of functions determine the switch status and were implemented in the Clipper Tools. Clipper implemented the SET() function, so that these settings can be determined, set, and saved with this version. Therefore, some functions in this chapter only exist to enable compatibility with existing programs. All the affected functions are flagged with an "*". If the functions relate to the Clipper switches (SET's), the function name is represented as follows: CSET + the first four characters of the switch name. For example, if the switch is named CONFIRM, then the function that corresponds is CSETCONF(). If the parameter is optional and unspecified, the function returns the current setting for its switch, without a status change. When called with parameters, the function sets the switch to the passed value and returns the prior status as a value. In this way, a function call can both change a switch and save the old status. The logical value .T. corresponds to the ON setting of a switch; .F. corresponds to OFF. Example In the following example, the CONFIRM switch was set to .F.: lOldValue:= CSETCONF(.T.) After execution, the old variable lOldValue has a value of .F.; while the CONFIRM switch is ON (.T.). In addition to their usefulness with Clipper switches, these functions determine an assortment of other status information. For example, you can determine the current status of the debugger, set LASTKEY, and differentiate key traps. You can also determine the status of CAPS-LOCK, NUM-LOCK, INSERT, and SCROLL-LOCK.
Note: Since this section is about DOS-TEXT mode programming, considered as obsolete and details skipped.