Click or drag to resize

Functions.FWriteLine Method

Write a string, a carriage-return character, and a linefeed character to an open file, specifying strongly-typed arguments.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.07
Syntax
 FUNCTION FWriteLine(
	 pFile AS USUAL,
	 c AS USUAL,
	 nCount AS USUAL
) AS DWORD
View Source

Parameters

pFile
Type: __Usual
The handle of the file. Please see the remark below about the compatibility of X# Runtime file handles and Win32 file handles.
c
Type: __Usual
The string to write.
nCount
Type: __Usual
The number of bytes in the string to write, beginning at the current file pointer position.

Return Value

Type: UInt32
The number of bytes written. If the value returned is equal to the nCount + 2, the operation was successful. If the return value is less than nCount + 2 or 0, this means that the length of the string was less than nCount, or the disk is full, or another error has occurred.
Remarks
Tip Tip
The low level File IO functions in the X# runtime are using .Net filestreams in the background.
That means that the file handles returned by FOpen() and FCreate() are not 'normal' file handles, but unique identifiers that are used to find the underlying stream object in a collection of streams in the runtime.
That also means that you can't use file handles for functions such as FRead() and FWrite() that were not created in the X# runtime.
If you want to access the underlying FileStream, then you should call the function FGetStream()
See Also