HALCON Reference Manual 10.0.2
Name
fwrite_stringfwrite_stringfwrite_stringFwriteStringFwriteString — Write values in a text file.
The operator fwrite_stringfwrite_stringfwrite_stringFwriteStringFwriteString puts out a string or numbers on the
output file. The operator open_fileopen_fileopen_fileOpenFileOpenFile opens a file.
The call set_system(::'flush_file', <boolean-value>:)set_system("flush_file", <boolean-value>)set_system("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>)SetSystem("flush_file", <boolean-value>)
determines whether the output characters are put out directly on the output
medium.
If the value 'flush_file'"flush_file""flush_file""flush_file""flush_file" is set to 'false'"false""false""false""false" the characters
(especially in case of screen output) show up only after the operator
fnew_linefnew_linefnew_lineFnewLineFnewLine is called.
Strings as well as whole numbers and floating point numbers
can be used as arguments. If more than one value serves as input the values
are put out consecutively without blanks.
The maximum string length is 1024 character
(including the end of string character).
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
StringStringStringStringstringVal (input_control) string(-array) → HTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)
Values to be put out on the text file.
Default value:
'hallo'
"hallo"
"hallo"
"hallo"
"hallo"
fwrite_string(FileHandle,['text with numbers:',5,' and ',1.0])
* results in the following output:
* 'text with numbers:5 and 1.00000'
fwrite_string(FileHandle,"text with numbers: ") ;
fwrite_string(FileHandle,"5") ;
fwrite_string(FileHandle," and ") ;
fwrite_string(FileHandle,"1.0") ;
/* results in the following output: */
/* 'text with numbers: 5 and 1.00000' */
/* Tupel Version */
int i;
double d;
Htuple Tuple ;
create_tuple(&Tuple,4) ;
i = 5 ;
d = 10.0 ;
set_s(Tuple,"text with numbers: ",0) ;
set_i(Tuple,i,1) ;
set_s(Tuple," and ",2) ;
set_d(Tuple,d,3) ;
T_fwrite_string(FileHandle,HilfsTuple) ;
fwrite_string(FileHandle,['text with numbers:',5,' and ',1.0])
* results in the following output:
* 'text with numbers:5 and 1.00000'
fwrite_string(FileHandle,['text with numbers:',5,' and ',1.0])
* results in the following output:
* 'text with numbers:5 and 1.00000'
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 fwrite_stringfwrite_stringfwrite_stringFwriteStringFwriteString
returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.
open_fileopen_fileopen_fileOpenFileOpenFile
close_fileclose_fileclose_fileCloseFileCloseFile
write_stringwrite_stringwrite_stringWriteStringWriteString
open_fileopen_fileopen_fileOpenFileOpenFile,
close_fileclose_fileclose_fileCloseFileCloseFile,
set_systemset_systemset_systemSetSystemSetSystem
Foundation
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |