|
|
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: B T
Length: 1170 (0x492)
Types: TextFile
Names: »B«
└─⟦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⟧
with Text_Io;
procedure Phone_Solution1 (Search_String : in String) is
Phone_File : Text_Io.File_Type;
Phone_List : constant String := "!users.dhe.tools.phone_list";
Found : Boolean := False;
Line : String (1 .. 100);
Last : Natural;
function Contains (Fragment : String; In_String : String) return Boolean is
begin
for I in In_String'First .. In_String'Last - Fragment'Length + 1 loop
if Fragment = In_String (I .. I + Fragment'Length - 1) then
return True;
end if;
end loop;
return False;
end Contains;
begin
Text_Io.Open (Phone_File, Text_Io.In_File, Phone_List);
while not Text_Io.End_Of_File (Phone_File) loop
Text_Io.Get_Line (Phone_File, Line, Last);
if Contains (Search_String,
Line (Line'First .. Line'First + Last - 1)) then
Found := True;
Text_Io.Put_Line (Line (Line'First .. Line'First + Last - 1));
end if;
end loop;
if not Found then
Text_Io.Put_Line ("Nothing matches the search string");
end if;
Text_Io.Close (Phone_File);
end Phone_Solution1;