FIX: Can't Nest SELECT CASE After CASE ELSE in Mac QuickBasic (47059)






This article was previously published under Q47059

SYMPTOMS

The program shown below demonstrates that the error "CASE after CASE ELSE" displays at run time if a second SELECT CASE construct is nested inside another SELECT CASE after the CASE ELSE statement.

Microsoft has confirmed this to be a bug that occurs in the interpreter in Microsoft QuickBasic version 1.00 for Macintosh . The problem does not occur in a compiled application.

This problem is corrected in QuickBasic version 1.00b.

MORE INFORMATION

The following program demonstrates the problem:
INPUT a
SELECT CASE a
   CASE 1
      PRINT "one"
   CASE 2
      PRINT "two"
   CASE ELSE
      INPUT b
      SELECT CASE b
         CASE 1
            PRINT "sub one"
         CASE 2
            PRINT "sub two"
      END SELECT
END SELECT
				
When the program is run in the interpreter, a "CASE after CASE ELSE" error message displays.

Modification Type: Minor Last Reviewed: 1/8/2003
Keywords: kbbug KB47059