Advertisement
Guest User

Untitled

a guest
Jan 15th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.65 KB | None | 0 0
  1. with Ada.Text_IO;         use Ada.Text_IO;
  2. with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
  3. with Ada.Float_Text_IO;   use Ada.Float_Text_IO;
  4.  
  5. package body Stringhandling is
  6.    
  7.  procedure Get (Text : out String_Type) is
  8. begin
  9.  
  10.    for I in 1..256 loop
  11.       Get(Text.Char_Array(I));
  12.       Text.Length:=I;
  13.       if End_Of_Line = True then
  14.      exit;
  15.       end if;
  16.    end loop;
  17. end get;
  18. ----------------------------------------------------------------------------------------------
  19. procedure Put (Text : in String_Type) is
  20. begin
  21.  
  22.    for I in 1..Text.Length loop
  23.       Put(Text.Char_Array(I));
  24.    end loop;
  25. end put;
  26.    
  27.  end Stringhandling;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement