Mike Schwab wrote:

<begin extract>
DCL LLIB(10) CHAR(44) INIT(' ');
Could have 10 blank literals seperated by commas?

DCL DISP(20) FIXED BIN(15) INIT(0);
Could have 20 zero literals seperated by commas?
<end extract>

String and coded-arithmetic initializations are somewhat different.
Here, to initialize all of the elements of both arrays, write

declare llib(20) character(44) initial((20)(1)' ') ;
declare disp(10) fixed binary(15,0) initial((20)0) ;

The first has three components: an element-repetition factor, a
string-repetition factor, and a string value.  Since padding on the
right with blanks occurs anyway in character strings it is not
strictly necessary to write it so: but a better, more explicit version
of the first declaration would be

declare llib(20) character(44) initial((20)(44)' ') ;

in which the initial specification is in effect: initialize each of
the 20 elements of this array with 44 instances of a single blank
concatenated together.  Or again one could write,

declare llib(20) character(44)
  initial((20)(1)'                                            ')  /*
44 blanks */ ;

But note that even here the string repetition factor must appear.

The code as it stands initializes only the first element of each array.

--jg

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to