STATUS
Microsoft has confirmed this to be a bug in the QBX.EXE
environment shipped with Microsoft Basic Professional Development
System (PDS) versions 7.00 and 7.10 for MS-DOS, in the QB.EXE
environment shipped with Microsoft Basic Compiler versions 6.00 and
6.00b for MS-DOS, and in the QB.EXE environment shipped with Microsoft
QuickBasic versions 4.00, 4.00b, and 4.50 (buglist4.00, buglist4.00b,
buglist4.50) for MS-DOS. We are researching this problem and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
Code Example
The following code example demonstrates the problem:
FUNCTION Foop$(x$) STATIC
Foop$ = x$ + "Z"
END FUNCTION
The module above should be compiled and built into a Quick library,
then QBX should be started with that Quick library. Calling this
FUNCTION twice in a row gives the incorrect results, as follows:
DECLARE FUNCTION Foop$(x$)
PRINT Foop$("abc")+Foop$("def")
This example prints "defZdefZ" instead of correctly printing "abcZdefZ".