|
|
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: 2724 (0xaa4)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
package body String_Operations is
function Is_Alpha_String (The_String : String) return Boolean is
type Status is (Passed, Failed);
Test_Status : Status := Passed;
begin
if The_String = "" then
Test_Status := Failed;
else
Check_String:
for Char in (The_String'First) .. The_String'Last loop
case The_String (Char) is
when 'a' .. 'z' | 'A' .. 'Z' =>
Test_Status := Passed;
when others =>
Test_Status := Failed;
exit Check_String;
end case;
end loop Check_String;
end if;
if Test_Status = Passed then
return True;
else
return False;
end if;
end Is_Alpha_String;
function Is_Alpha_Numeric_String (The_String : String) return Boolean is
type Status is (Passed, Failed);
Test_Status : Status := Passed;
begin
if The_String = "" then
Test_Status := Failed;
else
Check_String:
for Char in (The_String'First) .. The_String'Last loop
case The_String (Char) is
when 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' =>
Test_Status := Passed;
when others =>
Test_Status := Failed;
exit Check_String;
end case;
end loop Check_String;
end if;
if Test_Status = Passed then
return True;
else
return False;
end if;
end Is_Alpha_Numeric_String;
function Is_Alpha_Numeric_Underscore_String
(The_String : String) return Boolean is
type Status is (Passed, Failed);
Test_Status : Status := Passed;
begin
if The_String = "" then
Test_Status := Failed;
else
Check_String:
for Char in The_String'First .. The_String'Last loop
case The_String (Char) is
when 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' =>
Test_Status := Passed;
when others =>
Test_Status := Failed;
exit Check_String;
end case;
end loop Check_String;
end if;
if Test_Status = Passed then
return True;
else
return False;
end if;
end Is_Alpha_Numeric_Underscore_String;
end String_Operations;