If you use an index that refers to an element that does not exist in the array, the
instruction cannot be executed and INDEX ERROR results:
A
1.1. 12 I:# 1.4 1.5 1. h 17
A&#]
AC83
INDEX ERROR
A
You cannot index or do anything else with an array until after the array has been
specified. For example, suppose that no value has been assigned to the name 2;
then an attempt to store values in certain elements within 2 would result in an
error, since those elements do not exist:
z 1: 3 '4.3 4-1 El 46
z 1:: 3 '4.3 f- 1.8 4.6
VALlJE ERROR
A
Indices (whatever is inside the brackets) can be expressions, provided that when
those expressions are finally evaluated, the results are values that represent valid
indices for the array:
I3
ABC DE F' (3 H
I: ,JK I.. M NO PQ R S 7'1.1 V W X Y Z
xi-1 2 3 4 s
B C X X 2 3
X
BI:: l+XX33
b D FiH ,J
12343
LSG JM P
The array from which elements are selected does not have to be a variable. For
example, a vector can be indexed as follows:
2 3 5 7 9 1.1 13 1s 17 1.9c.7 2 4 23
' ABCDEFOHX JI{LMNOPQR!S'TUVWXYZ ' 1122 15 15 11. 2'7 1. b x :I
1.3 3 7 3
LAOK PA
40
instruction cannot be executed and INDEX ERROR results:
A
1.1. 12 I:# 1.4 1.5 1. h 17
A&#]
AC83
INDEX ERROR
A
You cannot index or do anything else with an array until after the array has been
specified. For example, suppose that no value has been assigned to the name 2;
then an attempt to store values in certain elements within 2 would result in an
error, since those elements do not exist:
z 1: 3 '4.3 4-1 El 46
z 1:: 3 '4.3 f- 1.8 4.6
VALlJE ERROR
A
Indices (whatever is inside the brackets) can be expressions, provided that when
those expressions are finally evaluated, the results are values that represent valid
indices for the array:
I3
ABC DE F' (3 H
I: ,JK I.. M NO PQ R S 7'1.1 V W X Y Z
xi-1 2 3 4 s
B C X X 2 3
X
BI:: l+XX33
b D FiH ,J
12343
LSG JM P
The array from which elements are selected does not have to be a variable. For
example, a vector can be indexed as follows:
2 3 5 7 9 1.1 13 1s 17 1.9c.7 2 4 23
' ABCDEFOHX JI{LMNOPQR!S'TUVWXYZ ' 1122 15 15 11. 2'7 1. b x :I
1.3 3 7 3
LAOK PA
40