EasyManua.ls Logo

WILLTEK 4403 - OPEN (on Files)

WILLTEK 4403
484 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 6 RAPID!
Commands
WCDMA Options Version 6.20
179
OPEN
(on files)
Description
Reads data from a previously opened file or communica-
tion port with the specified file handle into a variable.
INPUT will always read a complete line and then incre-
ment the line counter. This means that a second
INPUT
command with the same file handle will read the second
line of the file.
Notes:
–Before
INPUT may read from a file, it needs to be
opened for input first (please see the description of
the
OPEN command and the INPUT mode in this sub-
section). If you try to read from a file that was not
opened before, a runtime error will occur.
It is recommended that you check if the end of the
file was reached before you issue a subsequent
INPUT command: if INPUT tries to read after the end
of the file was reached, a runtime error will occur.
With the help of the
INPUT command, you may also
prompt the user to enter data during runtime of the
program. Please see subsection “Screen commands”
on page 162 for reference.
INPUT also reads data from the SCPI system. Please
refer to section SCPI and RAPID! for details.
Example
The following program reads a text file and stores the
data read from the file in a string array.
LET i=0
OPEN "STRINGS.TXT" FOR INPUT AS #1
DO WHILE NOT EOF(1)
LET i=i+1
INPUT #1, theStrgs$(i)
LOOP
CLOSE #1
Syntax
OPEN fileName$ FOR openMode AS
#fileNo
Parameters
fileName$ is a string expression containing a valid file
name including an optional path or the specification for
a communication port of the 4400 (please see below for
details).
openMode := {APPEND | INPUT | OUTPUT}
fileNo
is a numeric expression resulting in a positive
integer (the so-called file handle).

Table of Contents

Other manuals for WILLTEK 4403

Related product manuals