Condividi tramite


FPUTS( ) Function

Writes a character string, carriage return, and line feed to a file opened with a low-level file function.

FPUTS(nFileHandle, cExpression [, nCharactersWritten])

Return Values

Numeric

Parameters

  • nFileHandle
    Specifies the file handle number for the file to which FPUTS( ) writes data.

  • cExpression
    Specifies the character expression that FPUTS( ) writes to the file.

  • nCharactersWritten
    Specifies the number of characters in cExpression to write to the file.

    FPUTS( ) writes the entire character expression cExpression to the file if you omit nCharactersWritten. If you include nCharactersWritten, nCharactersWritten characters are written to the file. If nCharactersWritten is less than the number of characters in cExpression, only nCharactersWritten characters are written to the file. All of cExpression is written to the file if nCharactersWritten is equal to or greater than the number of characters in cExpression.

Remarks

FPUTS( ) returns the number of bytes written to the file. Zero is returned if FPUTS( ) cannot write to the file for any reason.

See Also

FCHSIZE( ) | FCLOSE( ) | FCREATE( ) | FEOF( ) | FFLUSH( ) | FGETS( ) | FOPEN( ) | FREAD( ) | FSEEK( ) | FWRITE( )