langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
19
Task/Arrays/PL-I/arrays.pli
Normal file
19
Task/Arrays/PL-I/arrays.pli
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/* 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;
|
||||
end;
|
||||
|
||||
/* Example of a dynamic array. */
|
||||
declare C(N) float controlled;
|
||||
get list (N);
|
||||
allocate C;
|
||||
C = 0;
|
||||
c(7) = 12;
|
||||
Loading…
Add table
Add a link
Reference in a new issue