Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
CLEARDATA Statement (DataBasic) (m618703+cleardata.htm)
Clears data that has been stored as stacked input by the DATA statement.
CLEARDATA
When a CLEARDATA statement has been executed, subsequent INPUT statements will request input from the terminal.
CLEARDATA can be used to ensure that the stack is empty prior to requesting terminal input.
CLEARDATA
DATA '1'
DATA '2'
DATA '3'
INPUT A; PRINT A
INPUT B; PRINT B
CLEARDATA
INPUT C; PRINT C
The first CLEARDATA statement ensures that the data stack is empty. Three data elements are then stacked and the first two are used to satisfy the first two INPUT statements. However, before the third INPUT statement can be satisfied by stacked data, the stack is cleared, so that input will be requested from the terminal.