|
|
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 - metrics - downloadIndex: T V
Length: 816 (0x330)
Types: TextFile
Names: »V«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
--
-- THIS PACKAGE IMPLEMENTS A GENERIC BINARY SEARCH FUNCTION.
-- IT WAS DESIGNED TO ALLOW USE OF AN ENUMERATION TYPE FOR THE TABLE
-- INDEX(A FEATURE OF POSSIBLY DUBIOUS UTILITY, BUT INCLUDED HERE FOR
-- UNIFORMITY WITH OTHER GENERIC OPERATIONS ON UNCONSTRAINED ARRAYS).
--
generic
type Index is (<>);
type Item is limited private;
type Table is array (Index range <>) of Item;
with function "=" (Left, Right : Item) return Boolean is <>;
with function ">" (Left, Right : Item) return Boolean is <>;
package Searching is
function Index_Of (Key : in Item; Within : in Table) return Index;
-- RETURNS THE INDEX OF THE ITEM IN WITHIN WHICH MATCHES KEY
-- IF THERE IS ONE, OTHERWISE RAISES NOT_FOUND.
Not_Found : exception;
-- RAISED IF THE SEARCH FAILS.
end Searching;