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 - metrics - download
Index: B T

⟦a43fb6607⟧ TextFile

    Length: 2704 (0xa90)
    Types: TextFile
    Names: »B«

Derivation

└─⟦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⟧ 

TextFile

package body Generic_Iterator_Operations_Solution is

    procedure Total_Count (Iter : in out Iterator; Total : out Integer) is
        Tot : Integer := 0;
    begin
        while not Done (Iter) loop
            Tot := Tot + Count (Value (Iter));
            Next (Iter);
        end loop;
        Total := Tot;
    end Total_Count;

    procedure Check (Iter : in out Iterator; Found : out Boolean) is
    begin
        while not Done (Iter) loop
            if Predicate (Value (Iter)) then
                Found := True;
            end if;
            Next (Iter);
        end loop;
        Found := False;
    end Check;

    procedure Total_True (Iter : in out Iterator; Total : out Natural) is
        Tot : Natural := 0;
    begin
        while not Done (Iter) loop
            if Predicate (Value (Iter)) then
                Tot := Tot + 1;
            end if;
            Next (Iter);
        end loop;
        Total := Tot;
    end Total_True;

    procedure Total_Count_With_Info (Info : Information;
                                     Iter : in out Iterator;
                                     Total : out Integer) is
        Tot : Integer := 0;
    begin
        while not Done (Iter) loop
            Tot := Tot + Count (Info, Value (Iter));
            Next (Iter);
        end loop;
        Total := Tot;
    end Total_Count_With_Info;

    procedure Total_True_With_Info (Info : Information;
                                    Iter : in out Iterator;
                                    Total : out Natural) is
        Tot : Natural := 0;
    begin
        while not Done (Iter) loop
            if Predicate (Info, Value (Iter)) then
                Tot := Tot + 1;
            end if;
            Next (Iter);
        end loop;
        Total := Tot;
    end Total_True_With_Info;
    procedure Check_With_Info (Info : Information;
                               Iter : in out Iterator;
                               Found : out Boolean) is
    begin
        while not Done (Iter) loop
            if Predicate (Info, Value (Iter)) then
                Found := True;
            end if;
            Next (Iter);
        end loop;
        Found := False;
    end Check_With_Info;

    procedure Process_All_With_State (Iter : in out Iterator) is
        S : State := Initialize;
    begin
        while not Done (Iter) loop
            Apply (Value (Iter), S);
            Next (Iter);
        end loop;
    end Process_All_With_State;

    procedure Process_All (Iter : in out Iterator) is
    begin
        while not Done (Iter) loop
            Apply (Value (Iter));
            Next (Iter);
        end loop;
    end Process_All;

end Generic_Iterator_Operations_Solution;