Array parameters can be passed in the following ways:
- Using a REXX stemmed variable. The array will be taken from the
member .1 or .1.1 (and so on).
xarray.1=10; xarray.2=20 /* and so on */
yarray.1=10 /* and so on */
/* Note dot after stemmed name */
'GSPLNE 3 .xarray. .yarray.'
- Using a prefix. REXX variables of the form prefix1, prefix2, for one
dimension and prefix1.1, prefix1.2 for two dimensions will be looked
for and their values used. The variables with these new names are
formed into a list and passed as an array to GDDM. For example:
vx1=10; vx2=8; vx3=5 /* and so on */
'GSPLNE 3 .vx .vy'
is passed to GDDM as
'GSPLNE 3 (.vx1 .vx2 .vx3) (.vy1 .vy2 .vy3)'
- Enumerated between parentheses. For example:
bot=5; mid=25
/* each member */
/* enumerated in parentheses */
'GSPLNE 3 (10 20 .bot)(20 .mid 30)'
or, for a two-dimensional array:
'CHBAR 3 2 ((10 40) (20 50) (30 60))'
- By stem or prefix names in parentheses; these represent columns in a
two-dimensional array. For example:
b.1=10; c.1=40
b.2=20; c.2=50
b.3=30; c.3=60
/* dimensioned values placed in */
/* parentheses when required */
/* array needs more dimensions */
'CHBAR 3 2 (.b. .c.)'
Note that this works only for columns, not for rows. The listed
values to achieve the same results would be either of these forms:
'CHBAR 3 2 ((.b.1 .c.1) (.b.2 .c.2) (.b.3 .c .3))'
'CHBAR 3 2 ((10 40) (20 50) (30 60))'
The method of handling parameters that do not exactly match the
specifications varies according to the type of parameters. All mismatches
not described below are treated as errors.
|