CLEARDATA

CLEARDATA

Top  Previous  Next

 

The CLEARDATA statement clears any data stored by previous DATA statements or DATA verbs and not yet processed by INPUT statements.

 

 

Format

 

CLEARDATA

 

 

The data queue is cleared. Any keyboard type-ahead is not affected by this statement. The CLEARDATA statement is most useful when recovering from error situations where the data queue could cause problems.

 

Stored data is cleared automatically on return to command prompt.

 

 

Example

 

ERROR.LABEL:

  CLEARDATA

  ABORT "A fatal error has occurred"

 

This program fragment could be used to ensure that the data queue is empty when aborting at some error condition.

 

 

See also:

CLEAR.DATA command