-- 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;

procedure ovf2 is

type one_to_thousand is range 1..1000;

n : one_to_thousand;

begin
    n := 1000;
    Put(Integer(n));
    New_Line;
    n := n + 1;
    Put(Integer(n));
    New_Line;
end ovf2;
