PRB: Long Variable Names from 2.x Not Found in Visual FoxPro (130455)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
This article was previously published under Q130455 SYMPTOMS
A program written in version 2.x of FoxPro demonstrates unpredictable
behavior when run in Visual FoxPro if it refers to fields or memory
variables with names containing more than 10 characters.
CAUSE
This behavior occurs because of additional features that have been added to
Visual FoxPro. The field or memory variable name may have been typed
incorrectly on one or more lines of code.
In FoxPro version 2.x, only the first 10 characters of procedure, field,
and memory variable names were considered significant. The following lines
of code would both update a memory variable named lmLongVari:
lmLongVariable = "ABCD"
lmLongVaribale = "DEFG"
After running this code in version 2.x, a single memory variable
(lmLongVari) exists, which contains a value of DEFG.
However, Visual FoxPro allows names with up to 254 characters. The same
code in Visual FoxPro would create two variables, each containing a
different value.
RESOLUTION
Verify that all names over 10 characters long are identically named in all
code that refers to them.
MORE INFORMATION
The cross reference report contained in the version 2.x FoxDoc application,
or the Visual FoxPro Documentation Wizard, can be helpful in determining
each location where a long variable name has been used.
Modification Type: | Major | Last Reviewed: | 2/11/2000 |
---|
Keywords: | KB130455 |
---|
|