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: 1653 (0x675) Types: TextFile Names: »B«
└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13 └─ ⟦124ff5788⟧ »DATA« └─⟦this⟧
separate (Generic_Kbs) package body System_Defined_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_Defined_Operators;