Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It stops at 100 or the length of the supplied string or the end of the line, whichever is shorter. You can also use unbounded strings which allows you to skip specifying the size for the output.

  with Ada.Strings.Unbounded.Text_IO;
  use Ada.Strings.Unbounded.Text_IO;

  with Ada.Strings.Unbounded;
  use Ada.Strings.Unbounded;

  procedure main is
    Line: Unbounded_String;
  begin
    Line := Get_Line;
    Put_Line(Line);
  end main;
https://learn.adacore.com - good source of tutorials, unfortunately a lot of the better learning materials beyond this are books, not online tutorials.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: