Command CLEAR GETS Foundation

Releases all Get objects in the current GetList array.

Syntax
CLEAR GETS
Description

The command CLEAR GETS ends the READ command and releases all Get objects in the currently visible GetList array. An empty array is assigned to the PUBLIC variable GetList. This variable references an array containing all the Get objects created with the command @...GET. During the command READ, CLEAR GETS can only be executed in a SET KEY procedure or a user defined function.

Examples
CLEAR GETS
// In the example, three Get objects are created and 
// displayed. If no data is input in the first entry field, 
// the entire READ is terminated. This occurs in the 
// user defined function cValidate(), where the value 
// of the first entry field is tested. 

PROCEDURE Main 
   LOCAL cVar:= Space(10), nVar:= 10, dVar := Date() 

   @ 10,10 SAY "String :" GET cVar VALID cValidate( cVar ) 
   @ 12,10 SAY "Number :" GET nVar RANGE 0, 100 
   @ 14,10 SAY "Date   :" GET dVar VALID dVar > Date() 
   READ 

RETURN 

FUNCTION cValidate( cString ) 
   IF Empty( cString ) 
      CLEAR GETS                // terminate input 
   ENDIF 
RETURN .NOT. Empty( cString ) 
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.