Aracılığıyla paylaş


FWRITE( ) Function

Writes a character string to a file opened with a low-level file function.

FWRITE(nFileHandle, cExpression [, nCharactersWritten])

Parameters

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

  • cExpression
    Specifies the character expression that FWRITE( ) writes to the file specified with nFileHandle.

  • nCharactersWritten
    FWRITE( ) writes the entire character expression to the file unless you include nCharactersWritten. When 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 the characters in cExpression are written to the file if nCharactersWritten is equal to or greater than the number of characters in cExpression.

Return Value

Numeric

Remarks

Unlike FPUTS( ), FWRITE( ) doesn't place a carriage return and a line feed at the end of the character string.

FWRITE( ) returns the number of bytes written to the file. If FWRITE( ) can't write to the file for any reason, 0 is returned.

See Also

Reference

FCHSIZE( ) Function

FCLOSE( ) Function

FCREATE( ) Function

FEOF( ) Function

FFLUSH( ) Function

FGETS( ) Function

FOPEN( ) Function

FPUTS( ) Function

FREAD( ) Function

FSEEK( ) Function

STRTOFILE( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)