|
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: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Behavior, seg_028b25
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Text_Io; package body Behavior is None : constant Class := 0; Shape : constant Class := 1; Circle : constant Class := 2; Rectangle : constant Class := 3; Square : constant Class := 4; Class_Id : Class := 0; type Shape_Part is record Shape : Integer := 1; end record; type Circle_Part is record Circle : Integer := 2; end record; type Rectangle_Part is record Rectangle : Integer := 3; end record; type Square_Part is record Square : Integer := 4; end record; type Object_Implementation (Kind : Class := 0) is record case Kind is when None => null; when Shape => S : Shape_Part; when Circle => C : Circle_Part; when Rectangle => R : Rectangle_Part; when Square => Sq : Square_Part; when others => null; end case; end record; procedure Create (B : in out Behavior.Object; C : Class) is begin B := new Object_Implementation (C); end Create; procedure Display (B : Behavior.Object) is begin case B.Kind is when None => Text_Io.Put_Line ("*** none ***"); when Shape => Text_Io.Put_Line ("shape"); when Circle => Text_Io.Put_Line ("circle"); when Rectangle => Text_Io.Put_Line ("rectangle"); when Square => Text_Io.Put_Line ("square"); when others => raise Non_Existent_Class_Error; end case; end Display; function Register return Class is begin Class_Id := Class_Id + 1; return Class_Id; end Register; end Behavior;
nblk1=4 nid=0 hdr6=8 [0x00] rec0=2f rec1=00 rec2=01 rec3=01a [0x01] rec0=01 rec1=00 rec2=04 rec3=006 [0x02] rec0=24 rec1=00 rec2=03 rec3=006 [0x03] rec0=05 rec1=00 rec2=02 rec3=000 tail 0x215212da283c552bbb9e9 0x42a00088462060003