write_tuple🔗
Short description🔗
write_tuple — Write a tuple to a file.
Signature🔗
write_tuple( tuple Tuple, filename.write FileName )
Description🔗
The operator write_tuple writes the contents of Tuple to a
file. The data is written in an ASCII format. Therefore, the file can be
exchanged between different architectures (see also
Tuple / String Operations). The default HALCON
file extension for the tuple is 'tup'.
Exception: Handles🔗
Note that write_tuple does not support handles, since binary data
is not supported by the underlying ASCII format.
Any handle contained in Tuple is replaced by the integer 0.
To write a tuple that contains handles, use serialize_tuple and
fwrite_serialized_item.
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🔗
Tuple (input_control) tuple(-array) → (real / integer / string)
Tuple with any kind of data.
FileName (input_control) filename.write → (string)
Name of the file to be written.
File extension: .tup
Result🔗
If the parameters are correct the operator write_tuple
returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.
Combinations with other operators🔗
Module🔗
Foundation