fnew_lineT_fnew_lineFnewLineFnewLine (Operator)
Name
fnew_lineT_fnew_lineFnewLineFnewLine
— Write a line break and clear the output buffer.
Signature
Description
The operator fnew_linefnew_lineFnewLineFnewLineFnewLine
writes a line break into the output
file defined by the handle FileHandleFileHandleFileHandleFileHandlefileHandle
.
The input file must have been opened with open_fileopen_fileOpenFileOpenFileOpenFile
in text format.
The call of fnew_linefnew_lineFnewLineFnewLineFnewLine
also empties possibly retained data from the
output buffer into the file (see fwrite_stringfwrite_stringFwriteStringFwriteStringFwriteString
and
set_system(::'flush_file', <boolean-value>:)set_system("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>)
).
Which characters are written as line break depends on the operating system:
under Windows the sequence
'\r\n'"\r\n""\r\n""\r\n""\r\n"
(carriage return + line feed) is used as the standard line break,
under Linux just '\n'"\n""\n""\n""\n" (line feed).
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
FileHandleFileHandleFileHandleFileHandlefileHandle
(input_control) file →
HFile, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
File handle.
Example (HDevelop)
fwrite_string(FileHandle,'Good Morning')
fnew_line(FileHandle)
Example (C)
fwrite_string(FileHandle,"Good Morning");
fnew_line(FileHandle);
Example (HDevelop)
fwrite_string(FileHandle,'Good Morning')
fnew_line(FileHandle)
Example (HDevelop)
fwrite_string(FileHandle,'Good Morning')
fnew_line(FileHandle)
Example (HDevelop)
fwrite_string(FileHandle,'Good Morning')
fnew_line(FileHandle)
Result
If an output file is open and it can be written to the file,
the operator fnew_linefnew_lineFnewLineFnewLineFnewLine
returns the value 2 (H_MSG_TRUE). Otherwise, an exception is raised.
Possible Predecessors
fwrite_stringfwrite_stringFwriteStringFwriteStringFwriteString
See also
fwrite_stringfwrite_stringFwriteStringFwriteStringFwriteString
Module
Foundation