ID: Q98921
The information in this article applies to:
FoxPro will run most FoxBASE+ programs without change. FoxPro is also compatible with dBASE 4, which is not completely compatible with FoxBASE+. Therefore, FoxPro must be informed which type of compatibility is desired by the developer. The information below describes how to ensure nearly complete FoxBASE+ compatibility.
The following command (the default) will allow FoxPro to run most programs written in FoxBASE+ and dBASE 3 without change:
SET COMPATIBLE TO FOXPLUS
Aside from issuing this command, you must make a few other changes to
ensure nearly complete FoxBASE+ compatibility. These changes are described
below and in Chapter 17 of the "Developer's Guide."
In the GOODIES\MISC directory is a special configuration file called CONFIG.FOX. This file configures FoxPro to be almost completely FoxBASE+ compatible. To use this file, rename it CONFIG.FP, or incorporate its contents into a new or currently active CONFIG.FP file.
FoxPro's built-in keystroke shortcuts are very similar to those of FoxBASE+/Mac and are also similar to those found in IBM's System Application Architecture (SAA) specification. However, the shortcuts are very different from those in FoxBASE+ for MS-DOS.
Fortunately, FoxPro's keystroke macro facility makes it easy to completely emulate FoxBASE+'s keystroke shortcuts. A set of keyboard macros that emulate FoxBASE+'s behavior is provided. These macros are in file called FOXPLUS.FKY, which is located in the GOODIES\MISC directory.
If programs rely on the exact keystrokes used to operate FoxBASE+ [and the READKEY() codes they generate], FOXPLUS.FKY should be used.
To activate these macros, use the following command:
RESTORE MACROS FROM FOXPLUS.FKY
To automatically load these macros on startup, rename FOXPLUS.FKY to
DEFAULT.FKY and place it in the same directory as FOXPRO.EXE.
SET NOTIFY OFF && Turns off FoxPro system messages.
SET STATUS ON && Turns on old-style status bar.
SET SCOREBOARD ON && Turns on old-style scoreboard.
SET BRSTATUS ON && Status bar will appear with BROWSE.
SET MACKEY TO && Disables "define macro" key, usually F10.
Some of the above settings, while required for complete compatibility, are
not really desirable for use in FoxPro. A good example is SET STATUS ON,
which activates the old-style status bar. Although this is not really
useful in native FoxPro mode, it is included for backward compatibility.
FoxPro is as perfectly compatible with FoxBASE+ as possible, given that it is an entirely different product. However, some of FoxPro's extensions have introduced a few minor areas where incompatibilities are inescapable.
1. FoxPro detects a few error conditions that are ignored by FoxBASE+. In
these conditions, programs written in FoxBASE+ will not operate as
before but will generate error messages. (For example, FoxBASE+ permits
arrays to have names that later became functions in FoxPro, such as an
array named POPUP.)
2. FoxPro has many new functions. If the name of one of these built-in
FoxPro functions has been used in an existing FoxBASE+ application as
the name of a user-defined function (UDF), FoxPro will naturally
interpret the name as that of the built-in function and will not execute
the UDF [a common example is the LOOKUP() function].
3. There have been reports of instances where an existing FoxBASE+
application used the following technique to initialize a string to the
null string (that is, a string containing no characters):
mystring = CHR(0)
In FoxBASE+, this code is equivalent to the normal technique:
mystring = ""
However, in FoxPro, which permits the null character to be stored in
strings, the first approach actually results in a string containing one
character, CHR(0), the null character. In short, if applications have
been written to rely on the fact that it is impossible to insert the
NULL character in a string in FoxBASE+, the application will not work
properly under FoxPro.
NOTE: In FoxPro 2.6, it is possible to put null values into logical and
numeric fields (not memory variables).
4. Since FoxPro's interface and interactive facilities (such as BROWSE and
EDIT/CHANGE) are entirely different from those of FoxBASE+, programs
that rely on the precise physical appearance of these facilities in
FoxBASE+ will not operate identically in FoxPro.
Additional reference words: FoxDos 2.00 2.50 2.50a 2.60
KBCategory: kbprg
KBSubcategory:
Last Reviewed: April 17, 1995