Skip to content

fnew_lineFnewLineFnewLinefnew_lineT_fnew_line🔗

Short description🔗

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

Signature🔗

fnew_line( file FileHandle )void FnewLine( const HTuple& FileHandle )static void HOperatorSet.FnewLine( HTuple fileHandle )def fnew_line( file_handle: HHandle ) -> None

Herror T_fnew_line( const Htuple FileHandle )

void HFile::FnewLine( ) const

void HFile.FnewLine( )

Description🔗

The operator fnew_lineFnewLine writes a line break into the output file defined by the handle FileHandlefileHandlefile_handle. The input file must have been opened with open_fileOpenFile in text format. The call of fnew_lineFnewLine also empties possibly retained data from the output buffer into the file (see fwrite_stringFwriteString and set_system(::'flush_file', <boolean-value>:)).

Which characters are written as line break depends on the operating system: under Windows the sequence ‘rn‘ (carriage return + line feed) is used as the standard line break, under Linux just ‘n‘ (line feed).

Execution information🔗

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🔗

FileHandlefileHandlefile_handle (input_control) file → (handle)HTuple (HHandle)HFile, HTuple (IntPtr)HHandleHtuple (handle)

File handle.

Example🔗

(HDevelop)

  fwrite_string(FileHandle,'Good Morning')
  fnew_line(FileHandle)
(C)
  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_lineFnewLine returns the value 2 (H_MSG_TRUE). Otherwise, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

fwrite_stringFwriteString

See also

fwrite_stringFwriteString

Module🔗

Foundation