DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦4d1850e73⟧ TextFile

    Length: 1421 (0x58d)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

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;