--
-- This is a test of semantic checking for test23 - test24.
--
package test25 is body
    -- lower bound should not be larger than upper bound
    type matrix is array [1..10] of array [2..1] of float;
    b : matrix;
    tempmatrix : array [100 .. 20] of matrix;  --  same problem here
    x : float;
    i, j, k : integer; 
begin 
    read (i); 
    j := 0;
    loop 
        j := j + 1; 
        read (b[j][1]);
	b[j][2] := b[j];  -- incompatible assignment
        exit when i == j;
    end loop;
    j := 1;
    loop 
        k := j; 
        loop
            if b[j][1] > b[k][1] then
                 x := b[k][1]; b[k][1] := b[j][1]; b[j][1] := x;
            elsif k < 10 then k := k + 1;
            else exit; 
            end if;
        end loop; 
        exit when j == 10; 
        j := j + 1; 
    end loop;
    j := 1;
    write ("the original and sorted lists are:");
    write ("");
    loop 
        write (b[j][2], b[j][1]); j := j + 1; 
        exit when j == 11; 
    end loop;
end.
