Function ReadExit() Foundation

Establishes the up arrow key and down arrow key as exit keys for READ.

Syntax
ReadExit( [<lToggle>] ) --> lReadExit
Parameters
<lToggle>
The logical expression <lToggle> determines whether the command READ or the function ReadModal() can be terminated by the up arrow and down arrow keys. When the value of <lToggle> is .T. (true), both keys are recognized as exit keys, otherwise they are not recognized as exit keys. The default setting is .F. (false).
Return

When ReadExit() is called without an argument, it returns the current setting as a logical value. If <lToggle> is passed, it becomes the new setting and the value of the old setting is returned.

Description

ReadExit() is used to permit or to disallow the termination of the READ command or the function ReadModal() by the up arrow and down arrow keys. In the default setting, the first GET input field in a GET list cannot be exited with the up arrow key and the last GET input field cannot be exited with the down arrow key. This setting can be changed with <lToggle>.

Examples
ReadExit() usage
// In the example, the current setting of ReadExit() is 
// saved and set to .T. in the same call. Then a 
// GET list with three input fields is displayed which 
// can be exited using the up arrow or down arrow keys. 

PROCEDURE Main 
   LOCAL cVar1 := Space(10) 
   LOCAL cVar2 := Space(10) 
   LOCAL cVar3 := Space(10) 
   LOCAL lSave := ReadExit(.T.)   // Saves and sets value 

   CLS 
   @ 10,10 SAY "Value1:" GET cVar1 
   @ 11,10 SAY "Value2:" GET cVar2 
   @ 12,10 SAY "Value3:" GET cVar3 
   READ 

   ReadExit( lSave )              // Sets back old value 

RETURN 

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.