fork download
  1. With Ada.Text_IO; Use Ada.Text_IO;
  2. With Ada.Integer_Text_IO; Use Ada.Integer_Text_IO;
  3.  
  4. procedure Program is
  5.  
  6. type String_Access is access all String;
  7.  
  8. Str_2 : aliased String (50 .. 60);
  9. Str_3 : aliased String (1 .. 10) := (others => '0');
  10.  
  11. Str_Acc_5 : String_Access := Str_3'Unrestricted_Access;
  12.  
  13. begin
  14.  
  15. Put (Str_Acc_5'First);
  16. New_Line;
  17. Put (Str_Acc_5'Last);
  18.  
  19. Str_Acc_5 := Str_2'Unrestricted_Access;
  20.  
  21. New_Line;
  22. Put (Str_Acc_5'First);
  23. New_Line;
  24. Put (Str_Acc_5'Last);
  25.  
  26. end Program;
Success #stdin #stdout 0s 5804KB
stdin
Standard input is empty
stdout
          1
         10
         50
         60