!TITLE %own initialisation The statement: %own %integer A declares an own integer A and initialises it to 0 (the default value when no value is specified). The statement: %own %integer X, Y, Z=4 declares X, Y and Z and initialises them to 0, 0 and 4 respectively. In IMP9 this statement causes X, Y and Z to be set to 4, 4 and 4. Note the difference! !PAGE It is bad practice to rely on default initialisation values, especially in IMP80, where existing implementations do not have the same defaults. The statements above are unambiguous if given as: %own %integer A=0 %own %integer X=0, Y=0, Z=4 !PAGE For convenience, constants used in own array initialisations can be followed by a repeat count, in brackets. This repeat count can be given as '(*)' where * represents the number of remaining array elements to be initialised. Example: %own %integer %array VALUES (1:50) = %c 17, 4, 6(3), 9, 22(17), 100(*) {all the rest} This also applies, of course, to constant and external array initialisation. Own arrays can be multi-dimensional; as before the bounds must be constants or constant expressions. The order in which array elements are assigned the initialising values in the declaration statement is such that the first subscript changes fastest. Thus, for an array A(1:2,1:3) the order of assignment would be A(1,1), A(2,1), A(1,2), A(2,2), A(1,3), A(2,3). !>