RosettaCodeData/Task/Identity-matrix/Ada/identity-matrix-2.ada
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

4 lines
217 B
Ada

type Matrix is array(Positive Range <>, Positive Range <>) of Integer;
mat : Matrix(1..5,1..5) := (others => (others => 0));
-- then after the declarative section:
for i in mat'Range(1) loop mat(i,i) := 1; end loop;