LOAD Command
| Visual FoxPro 9.0 SP2 |
| LOAD Command |
| See Also |
|
No longer available. 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:
Places a binary file, external command or external function in memory.
LOAD file [FUNCTION]
[SAVE] [NOSAVE]
|
Parameters
fileIn FoxPro for MS-DOS and FoxPro for Windows, file is the name of the file to load into memory. The default extension for a binary file is .BIN. When you call a binary routine, omit the extension. If a file you load has the same filename of a previously loaded file but a different filename extension, the new file replaces the previously loaded file.
In FoxPro for Macintosh, use file to specify the external command or function to place in memory.
FUNCTION
In FoxPro for Macintosh, you must include FUNCTION when loading an external function (XFNC) into memory.
SAVE
NOSAVE
In FoxPro for MS-DOS and FoxPro for Windows, LOAD and CALL support optional keywords for use with binary routines that write to the main FoxPro window.
SAVE and NOSAVE are ignored in FoxPro for Macintosh.
You can include SAVE (NOSAVE is the default) when loading a binary routine, or both SAVE and NOSAVE when calling a binary routine. If they are included with CALL, SAVE and NOSAVE override the keyword included with LOAD.
If SAVE is included, 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 to video RAM).
This means that anything written to the main FoxPro window by the binary routine is known to FoxPro and is treated as if FoxPro had written it. In particular, such externally written data isn't erased when a FoxPro object is dragged over it.
Unless it's necessary, don't include SAVE, because it takes FoxPro some time to scan and save the screen contents upon each return from the binary routine.
Creating a Binary File
----------------------
Follow these steps when creating a binary file for FoxPro for MS-DOS and FoxPro for Windows:
1. Assemble the program and create an object file with this command:
MASM file
2. Link the object file and create an executable file with this command:
LINK file
3. Create a binary file with this command:
EXE2BIN file
In addition, follow these rules when creating a FoxPro binary file:
Remarks
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic

Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08