$c+
module test11_4 { twoDimensions
-- test of arrays (2 dimension )}
private
 constant max = 3;
 typedefinition integer range[1..max] one_max;
 one_max i, k;
 integer j;
 integer array [one_max][one_max] a;
 begin
	 forall i -> read a[i][1]; llarof; { use data 1 2 3}
	 a[1][2] := a[1][1];
	 j := 2;
	 do j <= max -> 
		a[j][2] := a[j-1][2] + a[j][1];
		j := j+1;
	 od;

	forall i  -> 
		a[i][3] := a[i][1] * a[i][2]; 
	llarof;

	 j := 1;
	forall i -> 
		forall k  ->
			write a[i][k]; 
		llarof;
	llarof;
 { output
  1  1  1  2  3  6  3  6  18}
 end.
