Microsoft KB Archive/62891

= WAIT Causes Execution to Continue If Any Bit Is Set =

Article ID: 62891

Article Last Modified on 11/21/2006

-

APPLIES TO


 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q62891



SUMMARY
The WAIT statement stops monitoring the input port and resumes execution as soon as any bit changes at the input port.

The WAIT statement cannot be used to suspend program execution until only a certain bit pattern is read from a designated input port. However, this can be done using the INP function as shown in the program below, which loops until the byte read from port 1 is 13.

Code Example
DO   x% = INP(1) LOOP UNTIL x% = 13

Additional query words: QuickBas BasicCom

Keywords: KB62891

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.