|
|
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: 10240 (0x2800)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Field, seg_041237
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Text_Io;
use Text_Io;
package body Field is
procedure Put (Item : in out Object;
The_Kind : in String_Kind;
The_String : in String;
Ok : out Boolean) is
Index : Natural;
-- upper_case dans lex.get_value ou lower ??????
begin
case The_Kind is
when Name =>
case Item.Kind is
when Number =>
Identifier.Put (Item.Number_Name, The_String);
Ok := True;
when Sentence =>
Identifier.Put (Item.Sentence_Name, The_String);
Ok := True;
when Enumerate =>
Identifier.Put (Item.Enumerate_Name, The_String);
Ok := True;
when Unknown =>
Ok := False;
end case;
when Kind =>
if The_String = "ENTIER" then
Item := (Kind => Number,
Number_Name => Identifier.Null_Object,
Number_Value => 0);
Ok := True;
elsif The_String = "CHAINE" then
Item := (Kind => Sentence,
Sentence_Name => Identifier.Null_Object,
Sentence_Value => Identifier.Null_Object);
Ok := True;
else
-- tester index de enumerate_array(kind);
Item := (Kind => Enumerate,
Enumerate_Name => Identifier.Null_Object,
Enumeration => Index,
Literal => 0);
-- tester si enumeration (kind) existe
Ok := True;
end if;
when Value =>
if Item.Kind = Number then
Item.Number_Value := Integer'Value (The_String);
Ok := True;
elsif Item.Kind = Sentence then
Identifier.Put (Item.Sentence_Value, The_String);
Ok := True;
elsif Item.Kind = Enumerate then
-- tester index := index (enu_array,...);
-- tester index := index (identifier_array,...);
-- index de literal avec enumeration_index
Item.Literal := Index;
Ok := True;
else
Ok := False;
end if;
end case;
end Put;
procedure Image (Item : in Object) is
begin
Put ("Field : Type : " & Field_Kind'Image (Item.Kind));
case Item.Kind is
when Number =>
Put_Line (" Name : " & Name (Item) & " Number : " &
Integer'Image (Item.Number_Value));
when Sentence =>
Put_Line (" Name : " & Name (Item) &
" Sentence : " & Value (Item));
when Enumerate =>
Put_Line (" Name : " & Name (Item) & " Enumeration : " &
Natural'Image (Item.Enumeration) &
" Literal : " & Natural'Image (Item.Literal));
when Unknown =>
null;
end case;
end Image;
function Kind (Item : in Object) return Field_Kind is
begin
return Item.Kind;
end Kind;
function Name (Item : in Object) return String is
begin
case Item.Kind is
when Number =>
return Identifier.Value (Item.Number_Name);
when Sentence =>
return Identifier.Value (Item.Sentence_Name);
when Enumerate =>
return Identifier.Value (Item.Enumerate_Name);
when Unknown =>
return "";
end case;
end Name;
function Value (Item : in Object) return Integer is
begin
if Item.Kind = Number then
return Item.Number_Value;
else
return 0;
end if;
end Value;
function Value (Item : in Object) return String is
begin
case Item.Kind is
when Number =>
return Integer'Image (Item.Number_Value);
when Sentence =>
return Identifier.Value (Item.Sentence_Value);
when Enumerate =>
-- index1 := index (enu_array,...);
-- index2 := index (identifier_array,...);
-- index de literal avec enumeration_index
return "-?-";
when Unknown =>
return "";
end case;
end Value;
function Enumeration (Item : in Object) return Natural is
begin
if Item.Kind = Enumerate then
return Item.Enumeration;
else
return 0;
end if;
end Enumeration;
function Literal (Item : in Object) return Natural is
begin
if Item.Kind = Enumerate then
return Item.Literal;
else
return 0;
end if;
end Literal;
end Field;
nblk1=9
nid=9
hdr6=c
[0x00] rec0=1f rec1=00 rec2=01 rec3=02c
[0x01] rec0=15 rec1=00 rec2=08 rec3=030
[0x02] rec0=19 rec1=00 rec2=03 rec3=03e
[0x03] rec0=1c rec1=00 rec2=04 rec3=070
[0x04] rec0=22 rec1=00 rec2=05 rec3=076
[0x05] rec0=14 rec1=00 rec2=06 rec3=000
[0x06] rec0=1f rec1=00 rec2=05 rec3=008
[0x07] rec0=08 rec1=00 rec2=09 rec3=001
[0x08] rec0=57 rec1=33 rec2=00 rec3=005
tail 0x217416b5a861352a7ed54 0x42a00088462060003
Free Block Chain:
0x9: 0000 00 02 03 fc 80 1e 65 72 27 49 6d 61 67 65 20 28 ┆ er'Image (┆
0x2: 0000 00 07 02 7e 80 1c 20 20 20 20 20 20 20 20 20 20 ┆ ~ ┆
0x7: 0000 00 00 00 a4 80 10 6e 64 20 3d 20 4e 75 6d 62 65 ┆ nd = Numbe┆