-- 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,Ada.Float_Text_IO;

use Ada.Text_IO,Ada.Integer_Text_IO,Ada.Float_Text_IO;

procedure Assign is

type I_1_10 is range 1..10;
type F10digits is digits 10;

Val1 : Integer;
Val2 : I_1_10;
XVal1 : Float;
XVal2 : F10digits;

begin
    Val1 := 1;
    Val2 := 2;
    XVal1 := 1.2;
    XVal2 := 3.4;
    Put(Val1, Width=>1);
    New_Line;
    Put(Integer(Val2), Width=>1);
    New_Line;
    Put(XVal1, Fore=>1, Aft=>1, Exp=>0);
    New_Line;
    Put(Float(XVal2), Fore=>1, Aft=>1, Exp=>0);
    New_Line;
    --Val1 := Integer(XVal1);
    --Val2 := I_1_10(XVal2);
    --Put(Val1, Width=>1);
    --New_Line;
    --Put(Integer(Val2), Width=>1);
    --New_Line;
    --XVal1 := Float(Val1);
    --XVal2 := F10digits(Val2);
    --Put(XVal1, Fore=>1, Aft=>1, Exp=>0);
    --New_Line;
    --Put(Float(XVal2), Fore=>1, Aft=>1, Exp=>0);
    --New_Line;
end Assign; 
