ProvideX V8.20 > Language Reference > 2. Directives
149
Format 11: Clear
GRID CLEAR ctl_id,col,row[,width,height][,ERR=stmtref]
Use the GRID CLEAR format to clear or reset the contents of a range of cells to the
default (empty). You can clear a column or a row or both.
Reminder: If you use zero (0) as your value for both column and row, ProvideX
interprets that as all columns and rows, respectively and will clear the entire grid.
Format 12: Read First Cell
GRID READ ctl_id,col,row,var$,eom$[,ERR=stmtref]
Use var$ in the GRID READ format to receive the modified cell address and value of the
first selected cell. If the cell doesn't exist, an Error #2: END-OF-FILE on read or
File full on write. If there is more to read, the CTL event is re-posted.
The eom$ string tells you which input sequence ended the message (e.g., $0D$ for
the Enter key).
GRID READ directive must include both column and row addresses. ProvideX returns
a queue of cells that have been changed and generates an additional CTL event after a
read to ensure that no events are lost. There can be a problem due to potential race
conditions when the host is unable to keep up with the user input. To circumvent this,
ProvideX returns Error #2: END-OF-FILE on read or File full on write
if the queue is empty
Note: Under NOMADS, the read is automatic and should not be done by your
application. The data read is placed in the standard input variable with
control_name.row and control_name.col containing the associated cell
information.
Format 13: Read Next
GRID READ NEXT ctl_id,col,row,var$,eom$[,ERR=stmtref]
Use the string var$ in the GRID READ NEXT format to receive the modified cell
address and value of the next (not first) selected cell. If this cell doesn't exist,
ProvideX returns an Error #2: END-OF-FILE on read or File full on write. If
there is more to read, no CTL event is re-posted. The CTL value is posted when
another cell is changed. The eom$ string tells you what input sequence ended the
message (e.g., $0D$ for the Enter key)
Formats 14, 15, 16, 17: Select Read/Reset
Use the following formats to select ranges of cells to READ or to RESET (to remove cells
from the SELECT state). GRID SELECT can be used to control cell selection. (When you
SELECT a range of cells, the given cells are added to the list of selected cells.)