|
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: 3072 (0xc00) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Example_Of_Evaluators, seg_00469a
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
--| SUMMARY We show here how to obtain an Integer expression evaluator, and --| a 'mixed' (=integer+float) expression evaluator --| with Evaluator_Generic; with Text_Io; procedure Example_Of_Evaluators is package Fio is new Text_Io.Float_Io (Float); package Iio is new Text_Io.Integer_Io (Integer); procedure Get_Float_Literal (X : String; Item : out Float; Last : out Integer) is Int : Integer; L : Integer; begin Iio.Get (X, Int, L); case X (L + 1) is when '.' | 'e' | 'E' => Fio.Get (X, Item, Last); when others => Item := Float (Int); Last := L; end case; end Get_Float_Literal; function Float_Evaluator is new Evaluator_Generic (Float, 0.0, Get_Float_Literal); function Integer_Evaluator is new Evaluator_Generic (Integer, 0, Iio.Get); begin [statement] end Example_Of_Evaluators;
nblk1=2 nid=0 hdr6=4 [0x00] rec0=1e rec1=00 rec2=01 rec3=000 [0x01] rec0=04 rec1=00 rec2=02 rec3=000 tail 0x2170029c4815c669edce5 0x42a00088462061e03