DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦49025b408⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Test_Value, seg_0474c5

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Text_Io, Dynamic_Value;

procedure Test_Value is
    V1, V2, V3 : Dynamic_Value.Object;
    I : Integer;
    Ok : Boolean;

begin  
    Text_Io.Put ("je rentre dans le programme de test ");
    Text_Io.New_Line;
    Dynamic_Value.Set_Value (V1, 10);
    Dynamic_Value.Set_Value (V2, 25);
    Text_Io.Put (Dynamic_Value.Kinds'Image (Dynamic_Value.Get_Kind (V1)));
    Text_Io.New_Line;
    Text_Io.Put (Dynamic_Value.Kinds'Image (Dynamic_Value.Get_Kind (V2)));
    Text_Io.New_Line;
    declare
    begin
        Text_Io.Put ("je lis le nombre entier V1");
        Text_Io.New_Line;
        I := Dynamic_Value.Get_Value (V1);
        Text_Io.Put ("lecture reussie ,l'entier vaut " & Integer'Image (I));
        Text_Io.New_Line;
    exception
        when Dynamic_Value.Type_Clash =>
            Text_Io.Put ("exception levee !");
            Text_Io.New_Line;
    end;

    declare
    begin
        Ok := Dynamic_Value.Are_Equal (V1, V2);
        if (Ok) then
            Text_Io.Put ("v1 = v2");
            Text_Io.New_Line;
        else
            Text_Io.Put ("v1 different de v2");
            Text_Io.New_Line;
        end if;
    exception
        when Dynamic_Value.Type_Clash =>
            Text_Io.Put ("exception levee !");
            Text_Io.New_Line;
    end;

    declare
    begin
        Dynamic_Value.Change_Sign (Obj => V2, Result => V2);
        Text_Io.Put ("V2 = -V2 = " & Integer'Image
                                        (Dynamic_Value.Get_Value (V2)));  
        Text_Io.New_Line;
    exception
        when Dynamic_Value.Type_Clash =>
            Text_Io.Put ("exception levee !");
            Text_Io.New_Line;
    end;

    declare
    begin
        Dynamic_Value.Add (Left => V1, Right => V2, Result => V3);
        Text_Io.Put ("V1+V2 = " & Integer'Image (Dynamic_Value.Get_Value (V3)));
        Text_Io.New_Line;
    exception
        when Dynamic_Value.Type_Clash =>
            Text_Io.Put ("exception levee !");
            Text_Io.New_Line;
    end;
end Test_Value;

E3 Meta Data

    nblk1=4
    nid=3
    hdr6=6
        [0x00] rec0=22 rec1=00 rec2=01 rec3=00a
        [0x01] rec0=1f rec1=00 rec2=04 rec3=048
        [0x02] rec0=05 rec1=00 rec2=02 rec3=000
        [0x03] rec0=40 rec1=40 rec2=40 rec3=202
    tail 0x21544479486538ecf0ff2 0x42a00088462060003
Free Block Chain:
  0x3: 0000  00 00 00 70 80 2d 20 20 20 20 20 20 20 20 20 20  ┆   p -          ┆