KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q63004: SELECT CASE Example Correction for QuickBASIC 4.5 Manual

Article: Q63004
Product(s): See article
Version(s): 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | SR# S900613-130 docerr | mspl13_basic
Last Modified: 20-JUN-1990

On Page 121 of the "Microsoft QuickBASIC 4.5: Learning to Use" manual,
there is an error in the sample code for the SELECT CASE statement.

This information applies to Microsoft QuickBASIC version 4.50 for
MS-DOS.

The following code fragment from Page 121 is incorrect:

   IF LEN(Choice$) = 1 THEN
       ' Handle ASCII keys
           SELECT CASE ASC(Choice$)
              CASE ESC
                  PRINT "Escape key"
                  END
              CASE IS 32, 127
                  PRINT "Control code"
                    .
                    .
                    .

The statement "CASE IS 32, 127" should be changed to the following:

   CASE IS < 32, 127

The "<" (less than) symbol is missing from the example.

A correct version of the example is in the QB Advisor online Help
system for QuickBASIC version 4.50. You can find this code in "Example
2" from the example hypertext link when getting help on SELECT CASE.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.