DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 1614 (0x64e) Types: TextFile Names: »B«
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16 └─ ⟦6f12a12be⟧ »DATA« └─⟦this⟧
package body System_Operators is subtype Predicate_Operators is Operators range Is_Equal_Op .. Is_Any_Op; subtype Arithmetic_Operators is Operators range '+' .. Abs_Op; function Match (Using_Operator : Operators; Value : Integer; Against : Integer) return Boolean is begin case Using_Operator is when Is_Equal_Op => return Value = Against; when Is_Less_Op => return Value < Against; when Is_Less_Or_Equal_Op => return Value <= Against; when Is_Greater_Op => return Value > Against; when Is_Greater_Or_Equal_Op => return Value >= Against; when Is_Different_Op => return Value /= Against; when Is_Any_Op => return True; when Arithmetic_Operators => raise Illegal_Operation; end case; end Match; function Evaluate (Using_Operator : Operators; Left, Right : Integer) return Integer is begin case Using_Operator is when Predicate_Operators => raise Illegal_Operation; when '+' => return Left + Right; when '-' => return Left - Right; when '*' => return Left * Right; when '/' => return Left / Right; when Abs_Op => return abs Left; end case; end Evaluate; end System_Operators;