SELECT CASE Example Correction for QuickBasic 4.5 Manual (63004)



The information in this article applies to:

  • Microsoft QuickBASIC 4.5, when used with:
    • the operating system: MS-DOS

This article was previously published under Q63004

SUMMARY

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.

MORE INFORMATION

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.

Modification Type:MinorLast Reviewed:1/9/2003
Keywords:KB63004