DELA |
Dela is used to delete elements from single-sized tables, from a given index.
Dela start [ , number [ , limit ] ] list_nom_var
|
Element |
Description |
Restrictions |
|
start |
Integer numerical expression of the index in the tables from which the deletions are made. |
start should: |
|
number |
Integer numerical expression of the number of elements to be deleted. |
number > 0 |
|
limit |
Integer numerical expression of the index in the tables where deletions end. |
limit should not exceed the smallest of the upper limits of the tables. |
|
list_nom_var |
List ofnom_var separated by the character ','. |
None. |
|
nom_var |
nom_de_variable indicating the table from which the deletion has been made. For a scrolling table, this is the variable for the foot of the table. |
None. |
# Deletion of
rows from a scrolling table (whose
# foot of table variable is called NLI) according to
variable parameters Dela [V]DEB, [V]NB, [V]FIN [M]NLI
# There are two tables of elements (taken from a set of texts giving# names of terminal drivers). One (NOM) includes names of# files, the other (CAR) their "associated" characters:
|
|
0 |
1 |
2 |
3 |
4 |
5 |
... |
|
CAR |
A |
A |
H |
I |
V |
V |
... |
|
NOM |
ansi |
at386 |
hp |
ibm3151 |
vt200 |
vt200 |
... |
# Assume that 2 elements in the 3rd position are to be deleted# (that is from position 2): Dela 2, 2 CAR, NOM
# The result of this instruction will be:
|
|
0 |
1 |
2 |
3 |
... |
|
CAR |
A |
A |
V |
V |
... |
|
NOM |
ansi |
at386 |
vt200 |
vt200 |
... |
# Now assume that the limit has a value less than
# the number of elements in the tables :
Dela 2, 2,
4 CAR, NOM
# The result is
then:
|
|
0 |
1 |
2 |
3 |
4 |
3 |
... |
|
CAR |
A |
A |
V |
|
|
V |
... |
|
NOM |
ansi |
at386 |
vt200 |
|
|
vt200 |
... |
Dela is used to delete elements (default 1) from a set of single-sized tables. In the instruction's syntax, start establishes the index (shared by all the tables) where the deletion starts, and number indicates the number of elements to be deleted.
In each table, the elements are shifted left from the end of the table (this is the default 'limit') by a number of positions equal to 'number'. The last 'number' elements in the table are set to zero.
Giving a value to 'limit' that is less than the smallest of the lower limits of the tables (a higher value would not make sense) assumes that these tables are to be restricted. In this case the 'number' elements before 'limit' (including 'limit') are set to zero and those following are not modified. The following drawing simulates deletion of 'number' positions from a table of elements, D indicating 'start' and B 'limit' (note that the index element D is lost):
D< lost> B
|
|
|
|
|
|
D lost |
|
|
|
|
B |
|
|
|
|
|||
|
Before |
I |
I |
... |
I |
P |
P |
... |
P |
D |
D |
D |
... |
D |
I |
I |
... |
I |
|
After |
I |
I |
... |
I |
D |
D |
D |
... |
D |
|
|
... |
|
I |
I |
... |
I |
|
|
Unchanged |
Shifted |
Number |
Unchanged |
|||||||||||||
When rows are deleted from a scrolling table, the variable name given is that of the variable for the foot of the table; it then indicates all the variables of the scrolling table.
Where rows are deleted from a scrolling table, the foot of table variable is not updated.
|
Error |
Description |
|
ERMODE (10) |
start, number or limit are not numerical. |
|
ERINDI ( 8) |
One of the indices is outside the limits of one of the tables. |
|
ERDOM (50) |
number <= 0. |
|
ERDIM (55) |
One of the variables is not single-sized. |
|
|