RosettaCodeData/Task/Identity-matrix/PL-I/identity-matrix.pli

7 lines
166 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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;