Variables And Arrays; Type Declarations; Sample Results From Program Execution - Agilent Technologies 3458A User Manual

Hide thumbs Also See for 3458A:
Table of Contents

Advertisement

Sample Results From
Program Execution:

Variables and Arrays

Type Declarations

266
Chapter 7 BASIC Language for the 3458A
500 ENTER @Dvm; Mean
510 T2=TIMEDATE
520 PRINT"MEAN";Mean;"TRANSFER AND CALCULATION SPEED";T2-T1-(T1 -T0)
530 PRINT
540 END
MEAN 54.73391112 TRANSFER AND CALCULATION SPEED .399963378906
The 3458A employs two forms of numeric variables: simple variables (also
called "scalars") and subscripted arrays. Variable usage in the 3458A is very
similar to variable usage in an enhanced BASIC language. The 3458A does
not provide string variables. All variables are global among front panel,
GPIB. and subprogram operations. This means that you can dynamically
change variable values.
The 3458A uses two data types for its variables: Integer or Real. All variables
are real unless you declare them as integer. The valid range for real numbers
is:
–1.797 693 134 862 315 X 10
The smallest non-zero real value allowed is:
±2.225 073 858 507 202 X 10
A real number can have a value of zero.
An integer can have any whole-number value from:
–32767 through +32767
The DIM command declares real arrays. The INTEGER command declares
integer variables or arrays. The REAL command declares real variables or
arrays.
The following program statement declares real array A with 10 elements
(numbered 0 through 9).
OUTPUT 722; "DIM A(9)"
The following program statement declares integer array IARRAY with 10
elements (numbered 0 through 9) and integer variable B.
OUTPUT 722; "INTEGER IARRAY(9),B"
The following program statement declares real array RARRAY with 10
elements (numbered 0 through 9) with real variable C.
OUTPUT 722; "REAL RARRAY(9), C"
The 3458A declares variables automatically when a variable name appears
! Read M into computer
! Store end time
308
to 1.797 693 134 862 315 X 10
–308
308

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents