An array is a subscripted collection of data items of the same data type.
PL/I allows arrays of arithmetic values, character strings, bit strings, label constants, entry constants, pointers, files, or structures. You can refer more in it.
The following are examples of array declarations:
declare test_scores(100);
declare A(4,5);
declare A( 1:4, 2:5, 0: 10);
You make direct references to individual elements of an array by using a subscripted variable reference.
PL/I also allows you to make cross-sectional references, with the restriction that the reference must specify a data component whose storage is connected.
For example, using the following declarations,
declare A(5,2) fixed binary;
declare B(5,2) fixed binary;
Related Posts