home *** CD-ROM | disk | FTP | other *** search
- { ╔═══╦══════════════════════════════════════════════╦═══╗
- ║ ║ Pascal Library by Scott Wade ║ ║
- ║ ║ 715 FM 1959 Apt 310 ║ ║
- ║ ║ Houston, TX 77034 ║ ║
- ┌──────╨───╨──────────────────────────────────────────────╨───╨──────┐
- │ This group of routines is contributed to public domain, and no │
- │ one can possibly get any commercial value out of them since they │
- │ must be used in other programs. I require that if these are used │
- │ as is in any program, that this banner remain with the source │
- │ code of the program. I would appreciate any comments or sugges- │
- │ tions on improvements, & am curious to hear how these are used. │
- │ You can leave a message for me on these BBS's: │
- │ Ziggy's 821-1391 ScoreBoard 583-7848 │
- │ TBL-COMM 661-9040 Test-Mode 660-9252 │
- └────────────────────────────────────────────────────────────────────┘
-
- ZKEYS.LIB v1.1
- Input/keyboard read library test program.
- 9/27/85 added v1.1 : documentation cleaned up some.
- > ZStripBlanks(var Blankit : Buffer); This strips the leading blanks off of
- strings so i can convert them to real numbers, since the inadequecies of the
- VAL proc won't allow them. Used by zInt.
- > ZGetKey ; wait for a key to be pressed and continue
- > ZInt(var KeyInt : integer ; PromptLin : Buffer );
- Read any input and return it as integer.
- > ZReal(var KeyReal : Real ; PromptLin : Buffer );
- same, but return a real.
- }
-
- type Buffer = string[ 255 ];
- var
- KeyR : Real ;
- KeyNum : Integer ;
- Prompt : Buffer ;
-
- {$I zKeys.LIB }
-
- begin
- GoToXY(1,10);
- writeln('Test of zKeys.LIB');
-
- Prompt :='Enter an Integer:';
- ZInt( KeyNum , Prompt);
- writeln('Integer input was :',KeyNum);
-
- zGetKey ;
-
- Prompt :='Enter a Real Number:';
- Zreal( KeyR, Prompt);
- writeln('Real input was :',KeyR:4:2);
- end.