fnew_lineT_fnew_lineFnewLineFnewLinefnew_line (Operator)

Name

fnew_lineT_fnew_lineFnewLineFnewLinefnew_line — Write a line break and clear the output buffer.

Signature

fnew_line( : : FileHandle : )

Herror T_fnew_line(const Htuple FileHandle)

void FnewLine(const HTuple& FileHandle)

void HFile::FnewLine() const

static void HOperatorSet.FnewLine(HTuple fileHandle)

void HFile.FnewLine()

def fnew_line(file_handle: HHandle) -> None

Description

The operator fnew_linefnew_lineFnewLineFnewLinefnew_line writes a line break into the output file defined by the handle FileHandleFileHandleFileHandlefileHandlefile_handle. The input file must have been opened with open_fileopen_fileOpenFileOpenFileopen_file in text format. The call of fnew_linefnew_lineFnewLineFnewLinefnew_line also empties possibly retained data from the output buffer into the file (see fwrite_stringfwrite_stringFwriteStringFwriteStringfwrite_string and set_system(::'flush_file', <boolean-value>:)set_system("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>)set_system("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

Parameters

FileHandleFileHandleFileHandlefileHandlefile_handle (input_control)  file HFile, HTupleHHandleHTupleHtuple (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)
  

Result

If an output file is open and it can be written to the file, the operator fnew_linefnew_lineFnewLineFnewLinefnew_line returns the value 2 ( H_MSG_TRUE) . Otherwise, an exception is raised.

Possible Predecessors

fwrite_stringfwrite_stringFwriteStringFwriteStringfwrite_string

See also

fwrite_stringfwrite_stringFwriteStringFwriteStringfwrite_string

Module

Foundation