fwrite_string — Write strings and numbers into a text file.
fwrite_string writes one or more strings or numbers
to the output file defined by the handle
The output file must have been opened with
open_file in text format.
Strings and numbers that are to be written into the file are passed via the
String to the operator
String accepts also tuples where strings
and numbers are mixed.
All elements of the tuple are written consecutively into the file without
blanks or other separators in between.
Numbers are converted into a string before they are written.
fwrite_string emits a low-level error message, when the
string cannot be transcoded without loss of information into the specified
This can only happen when the file encoding is
'locale_encoding' and the current encoding of the HALCON library is
determines whether the output characters are immediately written to the file
If the value 'flush_file' is set to 'false', the characters
(especially in case of screen output) show up only after the operator
fnew_line is called.
→(string / integer / real)
Values to be written into the file.
Default value: 'hallo'
fwrite_string(FileHandle,['text with numbers:',5,' and ',1.0]) * results in the following output: * 'text with numbers:5 and 1.00000'
If the writing procedure was carried out
successfully, the operator
returns the value 2 (H_MSG_TRUE). Otherwise, an exception is raised.
Encoding errors have no influence on the result state.