CHAIN "RETURN Without GOSUB" When Using ON ERROR GOTO & No /O (37483)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
This article was previously published under Q37483 SUMMARY
When chaining from a program that does not trap errors (ON ERROR GOTO)
to a program that does, a "RETURN without GOSUB" error message can
appear. This occurs only when the programs are compiled requiring the
run-time library BRUN4x.EXE.
Because the run-time system is initialized in the first program, you
need to compile both programs with BC /E to support error trapping.
Another way to avoid this problem is to compile both programs with BC
/O to make them stand alone. With this process, the chaining program
does not require compiling with /E.
This information applies to Microsoft QuickBasic Versions 4.00, 4.00b,
and 4.50 and to Microsoft Basic Compiler Versions 6.00 and 6.00b for
MS-DOS and MS OS/2. The code below does not generate the error
described above with Microsoft Basic PDS Version 7.00.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | KB37483 |
---|
|