HALCON Reference Manual 10.0.2
Name
open_fileopen_fileopen_fileOpenFileOpenFile — Open text file.
The operator open_fileopen_fileopen_fileOpenFileOpenFile opens a file.
FileTypeFileTypeFileTypeFileTypefileType determines whether this file is an input
('input'"input""input""input""input") or output file ('output'"output""output""output""output" or
'append'"append""append""append""append"). open_fileopen_fileopen_fileOpenFileOpenFile creates files which can be
accessed either by reading ('input'"input""input""input""input") or by writing
('output'"output""output""output""output" or 'append'"append""append""append""append") are created.
For terminal input and output the file names 'standard'"standard""standard""standard""standard"
('input'"input""input""input""input" and 'output'"output""output""output""output") and 'error'"error""error""error""error"
(only 'output'"output""output""output""output") are reserved.
- Multithreading type: exclusive (runs in parallel only with independent operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Name of file to be opened.
Default value:
'standard'
"standard"
"standard"
"standard"
"standard"
Suggested values: 'standard'"standard""standard""standard""standard", 'error'"error""error""error""error", '/tmp/dat.dat'"/tmp/dat.dat""/tmp/dat.dat""/tmp/dat.dat""/tmp/dat.dat"
Type of file.
Default value:
'output'
"output"
"output"
"output"
"output"
List of values: 'input'"input""input""input""input", 'output'"output""output""output""output", 'append'"append""append""append""append"
* Creating of an outputfile with the name '/tmp/log.txt' and writing
* of one string:
open_file('/tmp/log.txt','output',FileHandle)
fwrite_string(FileHandle,'these are the first and last lines')
fnew_line(FileHandle)
close_file(FileHandle)
/* Creating of an outputfile with the name '/tmp/log.txt' and writing */
/* of one string: */
open_file("/tmp/log.txt","output",&FileHandle) ;
fwrite_string(FileHandle,"these are the first and last lines") ;
fnew_line(FileHandle) ;
close_file(FileHandle);
* Creating of an outputfile with the name '/tmp/log.txt' and writing
* of one string:
open_file('/tmp/log.txt','output',FileHandle)
fwrite_string(FileHandle,'these are the first and last lines')
fnew_line(FileHandle)
close_file(FileHandle)
* Creating of an outputfile with the name '/tmp/log.txt' and writing
* of one string:
open_file('/tmp/log.txt','output',FileHandle)
fwrite_string(FileHandle,'these are the first and last lines')
fnew_line(FileHandle)
close_file(FileHandle)
* Creating of an outputfile with the name '/tmp/log.txt' and writing
* of one string:
open_file('/tmp/log.txt','output',FileHandle)
fwrite_string(FileHandle,'these are the first and last lines')
fnew_line(FileHandle)
close_file(FileHandle)
If the parameters are correct the operator open_fileopen_fileopen_fileOpenFileOpenFile
returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.
fwrite_stringfwrite_stringfwrite_stringFwriteStringFwriteString,
fread_charfread_charfread_charFreadCharFreadChar,
fread_stringfread_stringfread_stringFreadStringFreadString,
fread_linefread_linefread_lineFreadLineFreadLine,
close_fileclose_fileclose_fileCloseFileCloseFile
close_fileclose_fileclose_fileCloseFileCloseFile,
fwrite_stringfwrite_stringfwrite_stringFwriteStringFwriteString,
fread_charfread_charfread_charFreadCharFreadChar,
fread_stringfread_stringfread_stringFreadStringFreadString,
fread_linefread_linefread_lineFreadLineFreadLine
Foundation
| HALCON Reference Manual 10.0.2 |
Copyright © 1996-2011 MVTec Software GmbH |