home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / pascal / IOFUNC.ZIP / ZKEYS.TST < prev   
Encoding:
Text File  |  1986-04-12  |  2.1 KB  |  51 lines

  1. {           ╔═══╦══════════════════════════════════════════════╦═══╗
  2.             ║   ║         Pascal Library by Scott Wade         ║   ║
  3.             ║   ║           715 FM 1959      Apt 310           ║   ║
  4.             ║   ║           Houston, TX 77034                  ║   ║
  5.      ┌──────╨───╨──────────────────────────────────────────────╨───╨──────┐
  6.      │  This  group of routines is contributed to public domain,  and no  │
  7.      │  one can possibly get any commercial value out of them since they  │
  8.      │  must be used in other programs. I require that if these are used  │
  9.      │  as is in  any  program,  that this banner remain with the source  │
  10.      │  code of the program.  I would appreciate any comments or sugges-  │
  11.      │  tions on improvements, & am curious to hear how these are used.   │
  12.      │  You can leave a message for me on these BBS's:                    │
  13.      │          Ziggy's  821-1391         ScoreBoard  583-7848            │
  14.      │          TBL-COMM 661-9040         Test-Mode   660-9252            │
  15.      └────────────────────────────────────────────────────────────────────┘
  16.  
  17. ZKEYS.LIB   v1.1
  18.   Input/keyboard  read library test program.
  19.   9/27/85 added v1.1 : documentation cleaned up some.
  20. > ZStripBlanks(var Blankit : Buffer); This strips the leading blanks off of
  21.   strings so i can convert them to real numbers, since the inadequecies of the
  22.   VAL proc won't allow them. Used by zInt.
  23. > ZGetKey ;       wait for a key to be pressed and continue
  24. > ZInt(var KeyInt : integer ; PromptLin : Buffer );
  25.       Read any input and return it as integer.
  26. > ZReal(var KeyReal : Real ; PromptLin : Buffer );
  27.       same, but return a real.
  28. }
  29.  
  30. type Buffer   = string[ 255 ];
  31. var
  32.    KeyR   : Real     ;
  33.    KeyNum : Integer  ;
  34.    Prompt : Buffer ;
  35.  
  36. {$I zKeys.LIB }
  37.  
  38. begin
  39.    GoToXY(1,10);
  40.    writeln('Test of zKeys.LIB');
  41.  
  42.    Prompt :='Enter an Integer:';
  43.    ZInt( KeyNum , Prompt);
  44.    writeln('Integer input was :',KeyNum);
  45.  
  46.    zGetKey ;
  47.  
  48.    Prompt :='Enter a Real Number:';
  49.    Zreal( KeyR, Prompt);
  50.    writeln('Real input was :',KeyR:4:2);
  51. end.