Links are not active on this page.
 _FPuts( ) API Library Routine

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. */

Expand imageRemarks

_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.

Expand imageExample

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

Visual FoxPro Code

 CopyCode imageCopy Code
SET LIBRARY TO FPUTS 

C Code

 CopyCode imageCopy Code
#include <pro_ext.h>
FAR Example(ParamBlk FAR *parm)
{
   FCHAN fchan;
   fchan = _FCreate("temp.tmp", FC_NORMAL);
   _FPuts(fchan, "Hello, world.");
   _FClose(fchan);
}
FoxInfo myFoxInfo[] = {
   {"FPUTS", (FPFI) Example, CALLONLOAD, ""},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};

Expand imageSee Also