Agilent Technologies E8285A User Manual page 331

Cdma mobile station test set
Hide thumbs Also See for E8285A:
Table of Contents

Advertisement

Chapter 6, IBASIC Controller
PROGram Subsystem
Example of querying the value of a simple string variable
OUTPUT 714;"PROGram:SELected:STRing? Variable"
ENTER 714;Value$
OUTPUT 714;"PROG:STR? Variable"
ENTER 714;Value$
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$(*)
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.
Example of querying the value of a string array whose name is known but whose cur-
rent size is unknown
05 OPTION BASE 1
10 DIM Temp$[5000] !This will hold 5000 characters
20 DIM Temp_array$(50)[200]!Temp array: 50 elements of 200 character
30 OUTPUT 714;"PROG:STR? Array" !Query the desired array
40 ENTER 714;Temp$ !Enter the values into a temporary string variable
50 N=0 !Initialize array pointer
60 REPEAT !Start loop to take values from string and put in array
70 N=N+1 !Increment array pointer
80 Pos_comma=POS(Temp$,",") !Find comma separator
90 Temp_array$(N)=Temp$[2,Pos_comma-2] !Put value into array
100 Temp$=Temp$[Pos_comma+1] !Remove value from temporary string
110 UNTIL POS(Temp$,",")=0 !Check for last value in temporary string
120 Temp_array$(N+1)=Temp$[2,LEN(Temp$)-1]!Put last value in array
130 END
The above example assumes that the total number of characters in the dimensioned
size of the IBASIC string array named Array is smaller than the dimensioned size
of the string variable named Temp$. Also, the maximum length of any element in
the IBASIC string array Array must be less than or equal to 200 characters.
330
S:\agilent\e8285\USRGUIDE\BOOK\CHAPTERS\ibasic.fb
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
or
or

Advertisement

Table of Contents
loading

Table of Contents