with ada.text_io;
use ada.text_io;
procedure exdemo is
i : positive;
s : string(1..4);
h : integer;
hibas_adat : boolean := true;
begin
while hibas_adat loop
begin
put_line("pozitiv szamot kerek");
get_line(s,h);
i := positive'value(s(1..h));
hibas_adat := false;
exception
when constraint_error => put_line("HIBA, a beadott adat nem pozitiv szam");
end;
end loop;
end exdemo;
VISSZA