RosettaCodeData/Task/Determine-if-a-string-is-numeric/Ada/determine-if-a-string-is-numeric-3.ada
Ingy döt Net 86c034bb8b new files
2013-04-10 12:38:42 -07:00

12 lines
414 B
Ada

with Ada.Text_Io; use Ada.Text_Io;
with Numeric_Tests; use Numeric_Tests;
procedure Is_Numeric_Test is
S1 : String := "152";
S2 : String := "-3.1415926";
S3 : String := "Foo123";
begin
Put_Line(S1 & " results in " & Boolean'Image(Is_Numeric(S1)));
Put_Line(S2 & " results in " & Boolean'Image(Is_Numeric(S2)));
Put_Line(S3 & " results in " & Boolean'Image(Is_Numeric(S3)));
end Is_Numeric_Test;