Other Issues in dBASE IV Compatibility

See Also

In addition to the few language and syntax differences, the following differences between Visual FoxPro and dBASE should be noted.

Parameter Passing

In dBASE IV, parameters are passed by reference to both procedures and functions. In Visual FoxPro, parameters are passed by reference to procedures and by value to functions.

To pass parameters by reference to functions, add the command SET UDFPARMS TO REFERENCE to your program, or explicitly use @ in front of the variables.

Changing Work Areas in a User-Defined Function

In Visual FoxPro, if you change the selected work area in a UDF, the newly selected work area remains selected when the UDF returns control to the calling program. Upon return from a UDF, dBASE IV reselects the work area that had been selected before the function was called.

SET MULTILOCKS

SET MULTILOCKS ON is implicit in dBASE IV. You must explicitly set multilocks on in Visual FoxPro by issuing the command SET MULTILOCKS ON in the Command window.

Reading Keystrokes

dBASE IV and Visual FoxPro use different keyboard shortcut keys in the interactive environment. If a dBASE IV application uses the READKEY( ) or LASTKEY( ) functions to check the user's last action and respond appropriately, errors might result.

Hard-Coded File Extensions

If you have hard-coded file extensions in your dBASE programs, you need to change some of the extensions. The following table shows Visual FoxPro equivalent extensions for each type of dBASE file that a program might use. This table assumes that the Converter has converted all associated dBASE files.

dBASE File Visual FoxPro File
.DBF No change needed
.DBT .FPT
.FMT .SCX
.FRG No change needed
.FRM .FRX
.LBG No change needed
.LBL .LBX
.MDX .CDX
.NDX .IDX
.PRG No change needed
.QBE No change needed