with ada.text_io; use ada.text_io; with ada.integer_text_io; use ada.integer_text_io; procedure quick is our_exception: Exception; procedure ourget(i: out integer) is begin get(i); if i < 1 or i > 100 then raise our_exception; end if; end ourget; c: character; v: natural; a: array (1..100) of integer; begin loop begin ourget(v); exit when v >= 1 and v <= 100; put_line("Did we get here?"); exit; exception when constraint_error => put_line("The integer that you entered is not a natural"); put_line("Enter a natural!"); when data_error => put_line("found non-numeric input "); -- skip_line; get(c); when end_error => put_line("end of file reached"); when our_exception => put_line("our_exception occurred"); put_line("enter an integer in the range"); --exit; end; end loop; put_line("Immediately after the loop"); put_line(v'img); a(v-100) := 100; put_line(v'img); v := v - 1000; put_line(v'img); exception when constraint_error => put_line("constraint: integer not a natural"); end quick;