The information in this article applies to:
SYMPTOMSCompiling a program that contains a SELECT CASE statement that uses a variable in a character substring of length 1, fails and gives the following error message:
CAUSEThe compiler incorrectly evaluates the length of a character substring, when the character substring is defined using a variable, not a constant. RESOLUTIONAvoid a SELECT statement that uses a character substring defined with a variable. Instead, use a character substring defined with a constant. As an alternative, you can define a temporary character variable of length 1 and assign the substring to that variable, which can be later used with a SELECT statement. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONSample Code to Reproduce Problem
Sample Code to Solve Problem
Sample Code to Solve Problem
Additional query words: 1.00 1.00a
Keywords : |
Last Reviewed: November 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |