PRB: SET COMPATIBLE ON Causes Problems with Arrays (184969)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Macintosh, Professional Edition 3.0
This article was previously published under Q184969 SYMPTOMS
If 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.).
CAUSE
When 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.
RESOLUTION
If the array needs to retain its contents, try one of the following:
- Issue SET COMPATIBLE OFF in the program or form.
- Add COMPATIBLE=OFF to the Config.fpw file.
- From the Tools menu, select Options. In the Options dialog box, click
the General tab and clear the dBase compatibility check box.
STATUS
This behavior is by design.
REFERENCES
Visual FoxPro 3.x for Windows Help; search on: SET COMPATIBLE and STORE
Visual FoxPro 3.0b for Macintosh Help; search on: SET COMPATIBLE and
STORE
Visual FoxPro 5.x for Windows Help; search on: SET COMPATIBLE and STORE
Visual FoxPro 3.x for Windows, "Language Reference", pages 756 and 794.
Visual FoxPro 5.x for Windows, "Language Reference", pages 379 and 403.
Visual FoxPro 3.0b for Macintosh, "Language Reference", pages 803 and 843.
Modification Type: | Major | Last Reviewed: | 5/2/2001 |
---|
Keywords: | kbprb KB184969 |
---|
|