Chapter 6 RAPID!
Functions
184 WCDMA Options Version 6.20
Functions
The functions of the RAPID! environment are subdivided into five groups:
– Numeric functions. They convert numeric values into different systems or
return numerical values. Typical examples are BIN, BIN$, CINT, OCT, OCT$,
HEX, HEX$, VAL or VAL$.
– String functions operate on strings or return string values. Typical examples
are ASC, CHR$, INSTR, LEN, LEFT$, MID$, RIGHT$ or SPACE$.
– I/O functions provide useful information concerning input and/or output
operations. Typical examples are DATE$, CLOCK, EOF or FREEFILE.
– Functions for error handling return values or strings related to errors. ERR,
ERL and ERF$ belong to this group.
– Mathematical functions support program-internal calculations with the
mathematical functions SQRT, SIN, COS or TAN just to name a few.
Description
Writes the specified expression(s) to a previously opened
file, using the specified file handle.
With the help of this command, several expressions may
be printed in the same line. When the separator is a
comma (,), the subsequent expression will be written at
the next tabulator position.
When the separator is a semicolon (;), the subsequent
expression will be written directly behind the previous
one.
Notes:
• Before PRINT may output to a file, it needs to be
opened for output or appending first (please see the
description of the
OPEN command and the OUTPUT and
APPEND modes in this subsection). If you try to write to a
file that was not opened before, a runtime error will
occur.
• With the help of the PRINT command, you may also
print data to the 4400’s screen. Please refer to subsection
“Screen commands” on page 162 for details.
• PRINT also reads data from the SCPI system. Please
check with section “SCPI and RAPID!” on page 219 for
details.
Examples
This example writes a string to a text file.
LET File=FREEFILE
OPEN "STRINGS.TXT" FOR OUTPUT AS #File
PRINT #File, "Save me"
CLOSE #File
Please compare the use of the
PRINT command in this
context with the third example for the
PRINT command
in the Screen commands description, too.