Start New Discussion within our Software Development Community

This is an Ada package that simply waits for the user to press the enter key. (If they enter anything else it's simply ignored.)

handy.ads
----------

with Ada.Text_IO;
package handy is
  procedure pause;
	
end handy;

handy.adb
----------
with Ada.Text_IO;

package body handy is
procedure pause is
  Wait: character;
  begin
    Ada.Text_IO.put("Press enter key to continue.");
    Ada.Text_IO.new_line;
    Ada.Text_IO.get_immediate(Wait);
  end pause;

end handy;
The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.