Unsupported dBASE IV Commands, Functions, and Clauses

See Also

Almost all of the hundreds of commands and functions in dBASE IV work exactly the same way in Visual FoxPro. The degree of compatibility is extremely high, and even more so with dBASE IV 1.0 and 1.1. However, the following commands, functions, and clauses differ in dBASE and Visual FoxPro.

@ ... GET

In Visual FoxPro, the dBASE REQUIRED clause in @ ... GET is ignored.

@ ... SCROLL

In Visual FoxPro, the dBASE WRAP clause is ignored.

ACCESS( )

In Visual FoxPro, the dBASE function ACCESS( ) always returns 0.

APPEND

In Visual FoxPro, the dBASE NOORGANIZE clause in APPEND is ignored.

APPEND FROM

In Visual FoxPro, the dBASE NOVERIFY and REINDEX clauses in APPEND FROM are ignored.

APPEND FROM ARRAY

In Visual FoxPro, the dBASE REINDEX clause in APPEND FROM ARRAY is ignored.

Arrays and Functions

During program execution, Visual FoxPro looks for functions before arrays. If you run a dBASE program in Visual FoxPro and the program has an array with the same name as a Visual FoxPro function or a user-defined function, Visual FoxPro executes the Visual FoxPro or user-defined function.

BARCOUNT( )

BARCOUNT( ) is provided for dBASE compatibility. In dBASE, BARCOUNT( ) returns the number of bars in a defined popup, regardless of whether or not the popup has been activated. BARCOUNT( ) in Visual FoxPro calculates the number of bars of active popups. BARCOUNT( ) returns 0 in Visual FoxPro if a popup has been defined but not activated.

BEGIN TRANSACTION

Visual FoxPro supports this command only for tables in a database. Marks the beginning of a transaction. Use ROLLBACK to revert to original state. END TRANSACTION saves the transaction.

BROWSE

In Visual FoxPro, the dBASE NOORGANIZE clause in BROWSE is ignored.

In Visual FoxPro, any setup or cleanup code in a format file specified in the BROWSE FORMAT clause is ignored.

CALL( )

In Visual FoxPro, the dBASE CALL( ) function generates an error. Use CALL instead.

CERROR( )

In Visual FoxPro, the dBASE CERROR( ) function is not supported.

CHANGE( )

In Visual FoxPro, the dBASE CHANGE( ) function always returns false (.F.).

CLEAR SCREEN

In Visual FoxPro, the dBASE CLEAR SCREEN command is ignored. Use RELEASE to clear screen type variables.

CLOSE PRINTER

In Visual FoxPro, the dBASE CLOSE PRINTER command is identical to SET PRINTER TO.

COMPLETED( )

In Visual FoxPro, the dBASE COMPLETED( ) function always returns false (.F.).

CONVERT

In Visual FoxPro, the dBASE CONVERT command generates an error.

DEXPORT

In Visual FoxPro, the dBASE DEXPORT command generates an error.

DGEN( )

In Visual FoxPro, the dBASE DGEN( ) function generates an error.

END TRANSACTION

In Visual FoxPro, the END TRANSACTION command is supported only for tables in a database. Saves the changes made during a transaction.

FCREATE( ) and FOPEN( )

In dBASE IV, the second parameter in the FCREATE( ) and FOPEN( ) functions can be "R" (read-only), "W" (write-only), "A" (append-only), "RW" or "WR (read and write), or "RA" or "AR" (read and append). Visual FoxPro supports these file attributes. The following table lists the Visual FoxPro behavior for these dBASE parameters.

FCREATE( )

dBASE Parameter Visual FoxPro Behavior
RW or WR Creates a file with read and write privileges and sets
the MS-DOS archive attribute.
A Creates a file with read and write privileges and sets
the MS-DOS archive attribute.
RA or AR Creates a file with read and write privileges and sets
the MS-DOS archive attribute.
R Creates a file with read-only privileges and sets
the MS-DOS read-only attribute.

FOPEN( )

dBASE Parameter Visual FoxPro Behavior
RW or WR Opens the file with read and write privileges
and positions the file pointer at the beginning of the file.
A Opens the file with read-only privileges
and positions the file pointer at the end of the file.
RA or AR Opens the file with read and write privileges
and positions the file pointer at the end of the file.
R Opens the file with read-only privileges
and positions the file pointer at the beginning of the file.

FLDLIST( )

In dBASE, FLDLIST( ) returns a field name followed by the -> operator and the table alias. In Visual FoxPro, FLDLIST( ) returns a field name followed by a period and the table alias.

ID( )

ID( ) in dBASE returns the name of the machine that dBASE is running on. ID( ) in Visual FoxPro returns the name of the machine that Visual FoxPro is running on and the number of the machine in the network. If no network is present, ID( ) in Visual FoxPro returns the machine name and 1.

ISMARKED( )

The ISMARKED( ) function is not supported in Visual FoxPro.

LKSYS( )

The LKSYS( ) function is not supported in Visual FoxPro.

MEMORY( )

In dBASE, issuing MEMORY( ) without a numeric argument returns the same value as MEMORY(0). This value is the amount of memory available to dBASE.

In Visual FoxPro, MEMORY( ) returns the amount of memory below 640K that is available to RUN an external program.

MEMORY(7)

In Visual FoxPro, the dBASE function MEMORY(7) always returns 0.

NETWORK( )

In Visual FoxPro, the dBASE function NETWORK( ) always returns true (.T.).

ON SELECTION POPUP

In Visual FoxPro, the dBASE BLANK clause in ON SELECTION POPUP is ignored.

_PDRIVER

In Visual FoxPro, if the printer driver you specify in _PDRIVER has a file name extension, you must include the file name extension with the printer driver file name. In dBASE, a .pr2 file name extension is assumed. You need only include a file name extension when the printer driver file name has an extension other than .pr2.

PROTECT

In Visual FoxPro, the dBASE PROTECT command generates an error.

RESET

In Visual FoxPro, the dBASE RESET command is ignored.

ROLLBACK

Visual FoxPro has a ROLLBACK command that works for tables in a database. Returns records to the state they were in before BEGIN TRANSACTION was issued.

RUN( )

The dBASE RUN( ) function is not supported in Visual FoxPro. Use the RUN command instead.

SAVE SCREEN

In Visual FoxPro, a screen saved in a procedure with SAVE SCREEN is private to the procedure. In dBASE, a screen saved in a procedure is public.

To emulate the dBASE behavior in Visual FoxPro, declare a public variable and then save the screen to the public variable.

SET CATALOG

In Visual FoxPro, the dBASE SET CATALOG command is ignored.

SET DBTRAP

In Visual FoxPro, the dBASE SET DBTRAP command is ignored. DBTRAP is always off in Visual FoxPro.

SET DESIGN

In Visual FoxPro, the dBASE SET DESIGN command is ignored. DESIGN is always on in Visual FoxPro.

SET EXCLUSIVE

In Visual FoxPro and dBASE IV version 2.0, SET EXCLUSIVE is ON by default. In dBASE IV version 1.5, SET EXCLUSIVE is OFF by default.

SET FIELDS

In dBASE, you can add /R to a field in the SET FIELDS command to make it read-only. This switch is ignored in Visual FoxPro.

SET IBLOCK

In Visual FoxPro, the dBASE SET IBLOCK command is ignored.

SET INSTRUCT

In Visual FoxPro, the dBASE SET INSTRUCT command is ignored. INSTRUCT is always off in Visual FoxPro.

SET LDCHECK

In Visual FoxPro, the dBASE SET LDCHECK command is ignored. LDCHECK is always off in Visual FoxPro.

SET MBLOCK

In dBASE, the value you specify for the memo field block size with SET MBLOCK is multiplied by 64.

SET MESSAGE

In Visual FoxPro, the dBASE AT clause in SET MESSAGE is ignored.

SET PRECISION

In Visual FoxPro, the dBASE SET PRECISION command is ignored. Visual FoxPro always uses 16 digits for calculations.

SET SQL

In Visual FoxPro, the dBASE SET SQL command is ignored. SQL is always on in Visual FoxPro.

SET TRAP

In Visual FoxPro, the dBASE SET TRAP command is ignored. TRAP is always on in Visual FoxPro.

SET("BORDER")

In Visual FoxPro, the border characters are returned. In dBASE, SET("BORDER") returns ASCII values for the border characters.

SET("CATALOG")

In Visual FoxPro, SET("CATALOG") always returns OFF.

SET("DBTRAP")

In Visual FoxPro, SET("DBTRAP") always returns OFF.

SET("DESIGN")

In Visual FoxPro, SET("DESIGN") always returns ON.

SET("FIELDS",1)

In Visual FoxPro, when FIELDS is set to LOCAL and COMPATIBLE is set to FOXPLUS or OFF, aliases are not returned with the field’s names.

SET("IBLOCK")

In Visual FoxPro, SET("IBLOCK") always returns 0.

SET("INSTRUCT")

In Visual FoxPro, SET("INSTRUCT") always returns OFF.

SET("LDCHECK")

In Visual FoxPro, SET("LDCHECK") always returns OFF.

SET("PRECISION")

In Visual FoxPro, SET("PRECISION") always returns 16.

SET("SQL")

In Visual FoxPro, SET("SQL") always returns ON.

SET("TRAP")

In Visual FoxPro, SET("TRAP") always returns ON.

SET("VIEW")

In Visual FoxPro, SET("VIEW") always returns the null string ("").

SYSPROC Configuration Item

In dBASE, you can include the SYSPROC configuration item in the dBASE configuration file to open a procedure file. The procedure file remains open during the entire dBASE session.

In Visual FoxPro, you can use SET LIBRARY to open an external API library file.

USE

In Visual FoxPro, the dBASE NOSAVE and NOLOG clauses in USE are ignored.