BUG: Modifying String During Concatenation May Yield Unexpected Results (250914)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
This article was previously published under Q250914 SYMPTOMS
A line of code concatenates a string with an in-line call to a function that modifies the first string and returns another string, but the resulting concatenated string is not what was expected.
RESOLUTION
To work around this problem, define an intermediate string variable to hold the value that is returned from the function, and then use this string in the concatenation. For example:
s1 = "String1"
s2 = GetString2(s1)
sTmp = s1 & s2
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbBug kbIDEProject kbnofix kbString KB250914 |
---|
|