次の方法で共有


FWRITE( ) Function

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

FWRITE(nFileHandle, cExpression [, nCharactersWritten])

Return Values

Numeric

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.

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

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