home *** CD-ROM | disk | FTP | other *** search
- {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
- The purchaser of these procedures and functions may include them in COMPILED
- programs freely, but may not sell or give away the source text.
-
- }
- {$I getintgr.lib}
- var
- MaxOne, MinOne, GotOne : integer;
- begin
- repeat
- ClrScr;
- Write('Enter a maximum integer value: ');
- Read(MaxOne);
- WriteLn;
- Write('Enter a minimum integer value: ');
- read(MinOne);
- if MaxOne <= MinOne then
- begin
- WriteLn;
- WriteLn('Come on! The minimum HAS to be less than the maximum!');
- WriteLn('Press a key and I''l let you start over.');
- repeat until keypressed;
- end;
- until MaxOne > MinOne;
- WriteLn;WriteLn;
- WriteLn('Now I''ll ASK you to enter an integer BETWEEN those two values,');
- Write('but you pretend to be a dummy and get it wrong: ');
- GotOne := GetInteger(MinOne,MaxOne);
- WriteLn;
- WRiteLn('Just got the Integer ',GotOne);
- WriteLn;
- WriteLn('You can use this procedure to protect your programs against being');
- WriteLn('crashed by data entry errors.');
- end.