DaniWeb IT Discussion Community

Code Snippets (http://www.daniweb.com/code/)
-   ada (http://www.daniweb.com/code/ada.html)
-   -   Basic Package (http://www.daniweb.com/code/snippet420.html)

Puckdropper ada syntax
Nov 4th, 2005
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.)

  1. handy.ads
  2. ----------
  3.  
  4. with Ada.Text_IO;
  5. package handy is
  6. procedure pause;
  7.  
  8. end handy;
  9.  
  10. handy.adb
  11. ----------
  12. with Ada.Text_IO;
  13.  
  14. package body handy is
  15. procedure pause is
  16. Wait: character;
  17. begin
  18. Ada.Text_IO.put("Press enter key to continue.");
  19. Ada.Text_IO.new_line;
  20. Ada.Text_IO.get_immediate(Wait);
  21. end pause;
  22.  
  23. end handy;