SELECT, IF, FOR, DO, WHILE, CASE, and SUB Structure Errors (31170)
This article was previously published under Q31170
SUMMARY
A common programming error is to incorrectly close one type of
control structure inside another. In many cases, you may get an error
message that does not seem to apply. However, if you look more
closely, you will find a structure in the program that was not
properly closed.
The following are errors that you can receive in QuickBasic when
you have improperly nested control structures:
1. CASE without SELECT
2. ELSE without IF
3. IF without END IF
4. END IF without block IF
5. FOR without NEXT
6. NEXT without FOR
7. DO without LOOP
8. LOOP without DO
9. WHILE without WEND
10. WEND without WHILE
11. SELECT without END SELECT
12. SUB/FUNCTION without END SUB/FUNCTION
13. END SUB/FUNCTION without SUB/FUNCTION
Modification Type: |
Minor |
Last Reviewed: |
1/8/2003 |
Keywords: |
KB31170 |
|