The information in this article applies to:
SYMPTOMSIf SET COMPATIBLE is ON and an array is redimensioned, the array loses it previously saved values and sets the current value to logical false (.F.). CAUSEWhen SET COMPATIBLE is set to ON or DB4, Visual FoxPro overwrites any existing array with a variable of the same name when a STORE command or assignment is made. RESOLUTIONIf the array needs to retain its contents, try one of the following:
STATUSThis behavior is by design. MORE INFORMATIONSteps to Reproduce BehaviorThis can be demonstrated when an array is redimensioned within a loop. To reproduce the problem, create a new program and enter the following code:
When the code is executed, the array has 10 elements, but only the last
element contains a value. The other elements contain a logical false (.F.).
© Microsoft Corporation 1998, All Rights Reserved. REFERENCES
Visual FoxPro 3.x for Windows Help; search on: SET COMPATIBLE and STORE Additional query words:
Keywords : kbMAC kbVFp FxprgGeneral FxprgSet |
Last Reviewed: December 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |