214 Chapter 5
Storing and Retrieving Test Results
Using the To/From File Objects
Lab 5-3: Using the To/From File Objects
This lab exercise describes the process of getting test data to and from files.
In this exercise, you will store and retrieve three common test result items: a
test name, a time stamp, and a one-dimensional array of Real values. The
same process will apply to all VEE data types.
Sending a Text String to a File
1. Select I/O ⇒ To ⇒ File. Set the entries as follows:
2. Double-click in the transaction area to display the
I/O Transaction
dialog box. (Refer to Figure 5-3 and Figure 5-4, if necessary.)
WRITE TEXT a EOL is the default transaction. It writes the data on pin a
using TEXT encoding and a specified end-of-line sequence. VEE is not
case-sensitive. You can use lower-case or upper-case strings for data
input and data output terminal names.
Set the entries as follows:
filename Use the default file
myFile. The default file
can be changed by clicking the
To File input
field to get a list box of files in the home
directory.
Clear File At
PreRun & Open
Check this box. By default, VEE appends new
data to the end of an existing file. Checking the
box clears the file before new data is written.
a
(expression field)
The expression list field is highlighted and
contains the default a. Type
"Test1", then
click OK. (You need the quotation marks to
indicate a
Text string. If you typed Test1
without the quotation marks, VEE would
interpret this as a terminal name or global
variable name.)
WRITE Use the default
WRITE.