|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Affectation, seg_0466bd
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Text_Io, The_Hero, The_Place, Complement_Identifier_Array; package body Affectation is procedure Create_Attribute (Item : out Object; An_Attribute : in Attribute.Object; An_Expression : in Expression.Object; Ok : out Boolean) is begin if (Attribute.Is_A_Number (An_Attribute) and Expression.Is_A_Number (An_Expression)) or (Attribute.Is_An_Enumerate (An_Attribute) and Expression.Is_An_Enumerate (An_Expression)) then Item := (Kind => Single_Attribute, An_Attribute => An_Attribute, New_Value => An_Expression); Ok := True; else Ok := False; end if; end Create_Attribute; procedure Create_Hero (Item : out Object; A_Hero : in Detail.Object) is begin Item := (Kind => Hero, New_Hero => A_Hero); end Create_Hero; procedure Create_Place (Item : out Object; A_Place : in Detail.Object) is begin Item := (Kind => Place, New_Place => A_Place); end Create_Place; procedure Run (Item : in Object) is Ok : Boolean; begin case Item.Kind is when Single_Attribute => if Attribute.Is_A_Number (Item.An_Attribute) then Attribute.Affect (Item.An_Attribute, Expression.Evaluate (Item.New_Value), Ok); else Attribute.Affect (Item.An_Attribute, Expression.Enumeration (Item.New_Value), Expression.Literal (Item.New_Value), Ok); end if; when Hero => The_Hero.Put (Detail.Index (Item.New_Hero)); Ok := True; when Place => The_Place.Put (Detail.Index (Item.New_Place)); Ok := True; when Unknown => Ok := False; end case; end Run; procedure Show (Item : in Object) is begin Text_Io.Put ("Affectation : Kind : " & Affectation_Kind'Image (Item.Kind)); case Item.Kind is when Single_Attribute => Attribute.Show (Item.An_Attribute); Expression.Show (Item.New_Value); when Hero => The_Hero.Show; Detail.Show (Item.New_Hero); when Place => The_Place.Show; Detail.Show (Item.New_Place); when Unknown => null; end case; end Show; end Affectation;
nblk1=5 nid=5 hdr6=6 [0x00] rec0=1c rec1=00 rec2=01 rec3=062 [0x01] rec0=1c rec1=00 rec2=04 rec3=036 [0x02] rec0=1c rec1=00 rec2=02 rec3=000 [0x03] rec0=04 rec1=00 rec2=05 rec3=000 [0x04] rec0=c0 rec1=00 rec2=00 rec3=100 tail 0x21749069286513ee2024e 0x42a00088462060003 Free Block Chain: 0x5: 0000 00 03 00 2f 80 03 73 65 3b 03 00 00 00 00 0d 20 ┆ / se; ┆ 0x3: 0000 00 00 00 07 80 01 3b 01 00 00 00 20 20 20 20 20 ┆ ; ┆