RosettaCodeData/Task/Identity-matrix/PL-I/identity-matrix.pli
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

6 lines
166 B
Text

identity: procedure (A, n);
declare A(n,n) fixed controlled;
declare (i,n) fixed binary;
allocate A; A = 0;
do i = 1 to n; A(i,i) = 1; end;
end identity;