PRINT TAB Can Change Value of Parameter in Subprogram (41536)
This article was previously published under Q41536
SYMPTOMS
The code below demonstrates that a variable that has been passed to a
subprogram procedure may incorrectly be changed by a PRINT TAB(n)
statement. However, the same statement in the main module does not
cause the error.
The problem can be avoided by not using the PRINT TAB(n) statement, or
by assigning a local variable to the passed parameter in the SUB and
using the local variable in the PRINT TAB(n) statement, or by
compiling with the BC /X option. (The /X compiler switch is normally
used only to flag an ON ERROR statement with RESUME, RESUME NEXT, or
RESUME 0.)
STATUS
Microsoft has confirmed this to be a bug in an .EXE program
compiled with BC.EXE in QuickBasic version 4.5. No problem occurs in
the QB.EXE environment. This problem was corrected in Microsoft Basic
Professional Development System (PDS) version 7.1 (fixlist7.10).
Modification Type: |
Minor |
Last Reviewed: |
1/8/2003 |
Keywords: |
KB41536 |
|