PRB: Long Variable Names from 2.x Not Found in Visual FoxPro

Last reviewed: April 30, 1996
Article ID: Q130455
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

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.


Additional reference words: 3.00 VFoxWin
KBCategory: kbprg kbprb
KBSubcategory: FxprgTable


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 30, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.