75
VisionNavi User Manual
Chapter 2
Tool
[File(File operation)]
The mode to open is as follows.
try
Starts a program block where exceptions
are detected and caught.
Try
...
catch (Exception)
...
UserData := ...
throw ([Exception, UserData])
endtry
until
Continue to execute the body as long as the
condition is not true.
repeat statement reference
while
Starts a loop block that is executed as long
as the condition is true.
while (TRUE)
…
endwhile
Function name Overview
Example of use
copy_file
Copy a file to a new location.
copy_file('source.txt',
'dest.txt')
delete_file
Delete a file. delete_file('delete.txt')
file_exists
Check whether file exists. file_exists('exsit.txt',
exist)
list_files
List all files in a directory.
list_files (dir, ['files','recur-
sive'], files)
make_dir
Make a directory.
make_dir('dir')
remove_dir
Delete an empty directory.
remove_dir('dir')
close_file Closing
a
text file.
close_file(handle)
fnew_line
Create a line feed.
fnew_line(handle)
fread_char
Read a character from a file.
fread_char (FileHandle, Char)
fread_line Read
a
line from a file.
fread_line(FileHan-
dle,Line,IsEOF)
fread_string
Read strings from a file.
fread_string(FileHan-
dle,String,IsEOF)
fwrite_string
Write values in a file.
fwrite_string(FileHan-
dle,['here it is again: ',String])
open_file
Open a file in ASCII or a binary format.
open_file('/tmp/log.txt','out-
put',FileHandle)
'input'
An already existing input file is opened for reading in ASCII format.
'output'
A new output file is opened for writing in ASCII format.
'append'
An already existing output file is opened at the end of the file for
writing in ASCII format.
'input_binary'
An already existing input file is opened for reading in binary format.
'output_binary'
A new output file is opened for writing in binary format.
'append_binary
An already existing output file is opened at the end of the file for
writing in binary format.
Summary of Contents for VisionNavi
Page 1: ...User Manual VisionNavi...
Page 6: ...VisionNavi User Manual vi...
Page 8: ...VisionNavi User Manual 16...
Page 9: ...Chapter 1 1 Outline of inspection...
Page 22: ...VisionNavi User Manual 14...
Page 23: ...Chapter 2 2 Tool...
Page 24: ...VisionNavi User Manual 18 2 1 Tool Description List A list of tools that can be selected...