Processing Variables with Arrays |
Expanding Your Use of
Arrays |
Assigning Initial Values to Arrays
There are times when it is useful to assign initial values to elements of an array when you define the array. |
array goal{4} g1 g2 g3 g4 (initial values); |
To assign initial values in an ARRAY statement,
|
array goal{4} g1 g2 g3 g4 (9000 9300 9600 9900); |
|
V V V V array goal{4} g1 g2 g3 g4 (9000 9300 9600 9900); ^ ^ ^ ^ |
|
V V V array goal{4} g1 g2 g3 g4 (9000 9300 9600 9900); |
|
V V array goal{4} g1 g2 g3 g4 (9000 9300 9600 9900); |
|
V V V V V V array colors{3} color1-color3 ('red','white','blue'); |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.