Simulating Nonblocking I/O

QuickWin does not accept unsolicited input. You get beeps if you type into an active window if no READ or GETCHARQQ has been done. Because of this, it is necessary to do a READ or GETCHARQQ in order for a character to be accepted. But this type of blocking I/O puts the program to sleep until a character has been typed.

In Fortran Console applications, PEEKCHARQQ can be used to see if a character has already been typed. However, PEEKCHARQQ does not work under Fortran QuickWin applications, since QuickWin has no console buffer to accept unsolicited input. Because of this limitation, PEEKCHARQQ cannot be used as it is with Fortran Console applications to see whether a character has already been typed.

One way to simulate PEEKCHARQQ with QuickWin applications is to add an additional thread:

For more information, see the Visual Fortran Samples PEEKAPP and PEEKAPP3 in the ...\DF98\SAMPLES\QUICKWIN folder.