22 lines
435 B
Plaintext
22 lines
435 B
Plaintext
/* Example of an array having fixed dimensions */
|
|
declare A(10) float initial (1, 9, 4, 6, 7, 2, 5, 8, 3, 10);
|
|
|
|
A(6) = -45;
|
|
|
|
/* Example of an array having dynamic bounds. */
|
|
get list (N);
|
|
|
|
begin;
|
|
declare B(N) float initial (9, 4, 7, 3, 8, 11, 0, 5, 15, 6);
|
|
B(3) = -11;
|
|
put (B(2));
|
|
end;
|
|
|
|
/* Example of a dynamic array. */
|
|
declare C(N) float controlled;
|
|
get list (N);
|
|
allocate C;
|
|
C = 0;
|
|
c(7) = 12;
|
|
put (C(9));
|