with ada.strings.unbounded; use ada.strings.unbounded; with ada.strings.unbounded.text_io; use ada.strings.unbounded.text_io; with ada.text_io; use ada.text_io; with ada.integer_text_io; use ada.integer_text_io; procedure getunbounded is s: unbounded_string; begin loop put("Enter a string: "); exit when end_of_file; -- get_line(s); also works s := get_line; -- Output the string, preceded by its length put(length(s)); put(":"); put_line(s); end loop; end getunbounded;