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

⟦9c8b0cab4⟧ TextFile

    Length: 1422 (0x58e)
    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

with Simple_Text_Io;
with String_Utilities;
procedure Count_Lines_Final_Solution (Filename : String) is

    Input : Simple_Text_Io.File_Type;

    Filename_Template : String (1 .. 30) := (others => ' ');

    Total_Lines : Natural := 0;
    Blank_Lines : Natural := 0;
    Comment_Lines : Natural := 0;
    Number_Of_Semicolons : Natural := 0;

begin
    Simple_Text_Io.Open (Input, Simple_Text_Io.In_File, Filename);

    while not Simple_Text_Io.End_Of_File (Input) loop

        declare
            Stripped_Line : constant String :=
               String_Utilities.Strip (Simple_Text_Io.Get_Line (Input));
        begin
            Total_Lines := Total_Lines + 1;

            if Stripped_Line = "" then
                Blank_Lines := Blank_Lines + 1;

            elsif String_Utilities.Locate ("--", Stripped_Line) =
                  Stripped_Line'First then

                Comment_Lines := Comment_Lines + 1;

            elsif Stripped_Line (Stripped_Line'Last) = ';' then

                Number_Of_Semicolons := Number_Of_Semicolons + 1;

            end if;

        end;
    end loop;

    Simple_Text_Io.Close (Input);

    Simple_Text_Io.Put (Blank_Lines, 8);
    Simple_Text_Io.Put (Comment_Lines, 16);
    Simple_Text_Io.Put (Number_Of_Semicolons, 14);
    Simple_Text_Io.Put (Total_Lines, 11);


    Simple_Text_Io.Put ("    ");
    Simple_Text_Io.Put_Line (Filename);

end Count_Lines_Final_Solution;