program t72_keypress; { t72 -- KeyPressed. DOS AH=0Bh asks whether a character is waiting, and TP3 lets the function be written without a parameter list (CALC.INC's Flash ends `until KeyPressed'). The fixture asks with one byte of input pending, reads it, and asks again - so both the true and the false answer are checked, and the call must not consume the byte. } var ch : char; begin if KeyPressed then writeln ('key') else writeln ('none'); read (ch); writeln (ch); if KeyPressed then writeln ('more') else writeln ('end') end.