DELETE action


Function
The action deletes one or more rows from local structured variable (i.e. local variable of Record type).
Declaration
 DELETE _struct, rowIdx

 
or
 
DELETE _struct, rowFrom, rowTo

Parameters
_struct in/out Identifier of local variable of Record type.
rowIdx in Identifier of Int type - row to be deleted.
rowFrom, rowTo in Identifier of Int type.

Description
The first variant of the action deletes the row specified by the parameter rowIdx from the local variable defined by the parameter _struct. The value of the parameter rowIdx must be within the interval 1 ... _struct\DIM. For other value, the action will generate the error _ERR_RANGE_ERROR.

The second variant of the action deletes the rows within the range of <rowFrom, rowTo> from the local variable defined by the parameter _struct.
Example
RECORD (SD.RecordDef) _struct
 
 REDIM _struct[10]
 ; deleting the first row
 DELETE _struct, 1


Related pages:

Napíšte komentár