Microsoft KB Archive/43563

= Function MENU% Fails in Hergert's &quot;QuickBasic, 2nd Edition&quot; =

Article ID: 43563

Article Last Modified on 11/21/2006

-

APPLIES TO


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

-



This article was previously published under Q43563



SUMMARY
The MENU% function in the Microsoft Press book &quot;Microsoft QuickBasic, Second Edition&quot; by Douglas Hergert will fail if it is coded without the variables &quot;true%&quot; and &quot;false%&quot; defined in the main program. If these lines are not included, the program will eventually enter an infinite loop that can only be exited with CTRL+BREAK.

The program can be found on Pages 68-71 in Hergert's book. This program, which is designed to be incorporated into your program, displays a menu box with menu options and returns a value equal to your selection. The book assumes that you have defined the variables &quot;true%&quot; and &quot;false%&quot; in the title of your main program. This is a documentation omission.

This information applies to Microsoft QuickBasic Versions 3.00, 4.00, 4.00b, and 4.50, to Microsoft Basic Compiler Versions 6.00 and 6.00b, and to Microsoft Basic PDS Version 7.00.

The workaround for this problem is to add one of the following lines of code to the beginning of the program: false% = 0 : true% = NOT false% true% = -1 : false% = NOT true%

Additional query words: QuickBas BasicCom

Keywords: KB43563

-

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

© Microsoft Corporation. All rights reserved.