JavaScript Editor js editor     Web development 

Main Page

Writes a specified null-terminated string to a file, followed by a carriage return/line feed pair.

unsigned int _FPuts(FCHAN chan, char FAR *buffer)
FCHAN chan;               /* File channel of file to write to. */
char FAR *buffer;            /* String to write. */


_FPuts(В ) returns the total number of bytes it writes to the file.

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.


The following example creates a file, and writes the text "Hello, world." to the file using _FPuts(В ).

Visual FoxPro Code

В Copy Code

C Code

В Copy Code
#include <pro_ext.h>

FAR Example(ParamBlk FAR *parm)
   FCHAN fchan;

   fchan = _FCreate("temp.tmp", FC_NORMAL);
   _FPuts(fchan, "Hello, world.");

FoxInfo myFoxInfo[] = {
   {"FPUTS", (FPFI) Example, CALLONLOAD, ""},
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo

See Also

JavaScript Editor js editor     Web development