220 Chapter 5
Storing and Retrieving Test Results
Using the To/From File Objects
6. In the same From File object, double-click below the second
transaction bar to display to the
I/O Transaction dialog box. Set
entries as follows:
Note If you do not know the size of an array, you may toggle SIZE to TO END.
This will read data to the end of the file without VEE knowing its exact size.
For example, you could use this feature to read the entire contents of a file as
a string array to examine the file contents.
The transaction bar in the
From File object should now contain the
statements
READ TEXT y STR and READ TEXT z REAL64 ARRAY:4.
Notice that VEE automatically adds the data output terminals for x, y,
and z. You can also manually add or delete input and output terminals
under object menu ⇒
Add Terminal, Delete Terminal, or using the
shortcuts
Ctrl-A and Ctrl-D.
7. Select
Display ⇒ AlphaNumeric and clone it twice to get three
displays. Connect the
AlphaNumeric objects to the three data output
pins on
From File. Enlarge the array display by clicking and dragging
the object by any corner.
Tip: You can also size the
AlphaNumeric displays by clicking and
dragging the object outlines when you first select them from the menu.
8. Run the program. It should look like Figure 5-8.
(expression field) Edit
x to z, so that the Real array is read back to the
Z output terminal.
SCALAR Change
SCALAR to ARRAY 1D.
SIZE: Now the
I/O Transaction box adds a SIZE
button. In this case, the array has four elements.
Replace
10 with 4 and click OK.