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

⟦b5d93eab3⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Calculateur, seg_037157, seg_037184, seg_03902d, seg_039083, separate Semantique.Calcul

Derivation

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

E3 Source Code



separate (Semantique.Calcul)
procedure Calculateur (Un_Elem : Ptr_Elt) is
    R1, R2 : Integer;
    Err_Affect, Par_Ouvr : exception;
begin
    if Un_Elem.Isfact then
        Pilfact.Push (Un_Elem.Fact, Pile);
    elsif Un_Elem.Op = Finop then
        null;
    else
        Getval (R2);
        case Un_Elem.Op is
            when 'p' =>
                null;
            when 'm' =>
                R2 := -R2;
            when others =>
                Getval (R1);
                case Un_Elem.Op is
                    when '+' =>
                        R2 := R1 + R2;
                    when '-' =>
                        R2 := R1 - R2;
                    when '*' =>
                        R2 := R1 * R2;
                    when others =>
                        raise Par_Ouvr;
                end case;
        end case;
        Pilfact.Push (new Facteur'(R2), Pile);
    end if;
exception
    when Var_Undef =>
        null;
    when Err_Affect =>
        Erreurs.Ajouter ("Affectation hors context");
    when Par_Ouvr =>
        Erreurs.Ajouter ("Parenthese non fermee.");
    when Pilfact.Underflow =>
        Erreurs.Ajouter ("Operande manquant pour l'operateur: ");
        Put (Un_Elem.Op);
    when Numeric_Error =>
        Erreurs.Ajouter ("Operande manquant pour l'operateur: ");
        Put (Un_Elem.Op);
    when others =>
        Erreurs.Ajouter ("Erreur dans l'evaluateur.");
end Calculateur;


E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=24 rec1=00 rec2=01 rec3=00c
        [0x01] rec0=0e rec1=00 rec2=02 rec3=001
    tail 0x21734590c84e24a7eb7d3 0x42a00088462060003