qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
KEYPRD.PAS
  Example Contents Index                                    Back
 
PROGRAM keyprd;
 
{ KEYPRD.PAS illustrates:
 
      KeyPressed    ReadKey
}
 
USES
    Crt;
 
CONST
    program_name = 'KEYPRESS ';
    program_desc = 'uses the Crt function KeyPressed. ';
 
VAR
    key : Char;
 
BEGIN
 
    Writeln( program_name, program_desc );
    Writeln;
 
    { Display message until key is pressed. }
    WHILE NOT KeyPressed DO
        Writeln( 'Press a key, any key.' );
 
    { Use ReadKey to throw key away. }
    key := ReadKey;
 
END.