CLEARDATA
Clears all data stored by the DATA statement.
Synopsis
CLEARDATA
Arguments
None.
Description
The CLEARDATA statement flushes (clears) all remaining data stored in the input stack by the DATA statement. Following CLEARDATA, the INPUT statement issues a user prompt, rather than automatically receiving data stored by the DATA statement.
Examples
The following example illustrates the use of the CLEARDATA statement:
DATA "New York","Chicago","","Annapolis"
FOR x=1 TO 4
INPUT cityname
IF cityname=""
THEN CLEARDATA
PROMPT "Missing name: "
INPUT cityname
ELSE
PRINT cityname
NEXT