-- Collection of code snippets by Arne Vajhøj 
-- (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
with Ada.Text_IO,Ada.Integer_Text_IO;

use Ada.Text_IO,Ada.Integer_Text_IO;

-- control flow

procedure Flow is

J : Integer;

begin
    for I in 1..10 loop
        if I > 1 then
            Put(",");
        end if;
        Put(I,Width=>1);
    end loop;
    New_Line;
    J := 1;
    while J <= 10 loop
        case J is
            when 1 => Put("");
            when 2..10 => Put(",");
            when others => null;
        end case;
        Put(J,Width=>1);
        J := J + 1;
    end loop;
    New_Line;
    J := 1;
    loop
        case J is
            when 1 => Put("");
            when 2..10 => Put(",");
            when others => null;
        end case;
        Put(J,Width=>1);
        J := J + 1;
        exit when J > 10;
    end loop;
    New_Line;
end Flow; 
