Basic Package

Puckdropper 0 Tallied Votes 166 Views Share

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;