CALL Command

Included for backward compatibility. Use SET LIBRARY instead.

This command is undocumented in the original VFP9 help file,
but the following documentation was found in the FoxPro for Windows 2.6 help, and may still be valid:

Executes a binary file, external command or external function that has been placed in memory with LOAD.

CALL file
	[WITH expC | WITH memvar1]
	[TO memvar2]


 In FoxPro for MS-DOS and FoxPro for Windows, the binary file to be called is specified with file. It isn't necessary to specify an extension in the filename, since the extension is stripped from the file when it's loaded.

 In FoxPro for Macintosh, use file to specify the memory resident external command or function to execute.

WITH expC | WITH memvar1
 WITH can be used to pass a character string or memory variable parameter to the binary subroutine, external command or external function. The memory variable can be of any data type.

 In FoxPro for MS-DOS and FoxPro for Windows, you can pass a single parameter to the binary routine.

 In FoxPro for Macintosh, you can pass multiple parameters in a comma delimited character expression.

 In FoxPro for MS-DOS and FoxPro for Windows, when the called binary file executes, the code segment initially points to the beginning of the module. The DS and BX register pair points to the first byte of the parameter passed using WITH. If no parameter is passed, BX contains 0.

TO memvar2
 A binary routine, external command or external function can return a value to a memory variable by including the TO memvar2 clause.

 In FoxPro for MS-DOS and FoxPro for Windows, CALL and LOAD both support the SAVE keyword for use with binary routines that write to the screen.

 SAVE and NOSAVE are ignored in FoxPro for Macintosh.

 NOSAVE is the default. You may include SAVE when loading a binary routine with CALL, or SAVE and NOSAVE when loading a binary routine in memory with LOAD. If specified with CALL, SAVE or NOSAVE overrides the SAVE or NOSAVE setting specified with LOAD.

 If CALL ... SAVE is specified, FoxPro copies the current contents of video RAM into the main FoxPro window upon return from the binary routine (assuming that the binary routine is writing directly into video RAM). This means that anything written by the binary routine is known to FoxPro and is treated as if FoxPro had written it. In particular, if SAVE is in effect, such externally written data will not be erased the first time a FoxPro object is dragged over it.

 Unless it is needed, the SAVE clause isn't desirable since it takes FoxPro some time to scan and save the screen contents upon each return from the binary routine.

Expand imageRemarks

Expand imageSee Also

© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic