all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
14
Task/User-input-Text/Ada/user-input-text-1.ada
Normal file
14
Task/User-input-Text/Ada/user-input-text-1.ada
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
function Get_String return String is
|
||||
Line : String (1 .. 1_000);
|
||||
Last : Natural;
|
||||
begin
|
||||
Get_Line (Line, Last);
|
||||
return Line (1 .. Last);
|
||||
end Get_String;
|
||||
|
||||
function Get_Integer return Integer is
|
||||
S : constant String := Get_String;
|
||||
begin
|
||||
return Integer'Value (S);
|
||||
-- may raise exception Constraint_Error if value entered is not a well-formed integer
|
||||
end Get_Integer;
|
||||
2
Task/User-input-Text/Ada/user-input-text-2.ada
Normal file
2
Task/User-input-Text/Ada/user-input-text-2.ada
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
My_String : String := Get_String;
|
||||
My_Integer : Integer := Get_Integer;
|
||||
Loading…
Add table
Add a link
Reference in a new issue