User`s manual

Chapter 8 283
IBASIC Controller
PROGram Subsystem
If an attempt is made to query the value of a string variable or array
and no IBASIC program is in the Test Set an IBASIC Error: -283
Illegal variable name is generated. If an attempt is made to query
the value of a string variable or array and the string variable specified
in <varname> does not exist in the program an IBASIC Error: -283
Illegal variable name is generated.
Example 8-39 Syntax
PROGram[:SELected]:STRing? <varname>
NOTE
The program commands and syntax used to enter string data from
the Test Set into the external controller will depend upon the
programming language used in the external controller. The examples
that follow represent the capabilities of the Agilent Technologies Rocky
Mountain BASIC (RMB) programming language running on an HP
9000/300 Series Controller.
Example 8-40 Example of querying the value of a simple string variable
OUTPUT 714;"PROGram:SELected:STRing? Variable"
ENTER 714;Value$
or
OUTPUT 714;"PROG:STR? Variable"
ENTER 714;Value$
Example 8-41 Example of querying the value of a string array with 3 elements
of 5 characters each, such as Array$(2)[5]
OUTPUT 714;"PROGram:SELected:STRing? Array"
ENTER 714 USING "3(X,5A,2X)";Result_array$(*)
or
OUTPUT 714;"PROG:STR? Array"
ENTER 714 USING "3(X,5A,2X)";Result_array$(*)
This example assumes that the string array named Result_array$(*) is
dimensioned exactly the same as the array named Array in the IBASIC
program and that each element in the string array Array has five
characters in it.