EasyManuals Logo
Home>Agilent Technologies>Multimeter>3458A

Agilent Technologies 3458A User Manual

Agilent Technologies 3458A
372 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #269 background imageLoading...
Page #269 background image
Chapter 7 BASIC Language for the 3458A 269
the maximum array size is determined by available 3458A memory
(approximately 10 kbytes if no stored states or subprograms are stored). A
non-integer subscript is rounded to the nearest integer.
Arrays may be resized by re-declaring them. This initializes each element in
the array to a value of zero. You cannot, however, redefine the type of array
(real or integer) without scratching memory first (refer to the SCRATCH
command in chapter 6). Array elements may be used in the same ways simple
variables are used.
Filling Arrays Array elements are initialized to zero when they are declared (DIM, REAL,
or INTEGER commands) or are re-sized. Once you have dimensioned an
array, use the FILL command to load your values into the array. The FILL
command has the following syntax:
FILL array_name, list
The following program fills an integer array with integer values.
10 OUTPUT 722; "INTEGER LIST(9)"
20 OUTPUT722; "FILL LIST 0,100,200,300,400,500,600,700,800,900"
30 END
Note Use the FILL command carefully. It does not work if power is cycled. The
command is effectively deleted from the subprogram at this time. Use
separate LET statements for each value assigned.
Array Size The SIZE? query command returns the number of elements in the specified
array. This number is one more than the index of the last element in the array
due to the option base 0 convention used by the 3458A. Thus, if you
dimension a 10-element array (e.g., DIM LIST(9) ), the SIZE? command will
return "10".
The following program defines an integer array with 10 elements and then
verifies the array size using the SIZE? command.
10 OUTPUT 722; "INTEGER IARRAY(9)"
20 OUTPUT 722; "SIZE? IARRAY"
30 ENTER 722; A
40 PRINT A
50 END
Purging Arrays and
Variables
All variables and arrays are stored in 3458A volatile memory. If the 3458A
loses power, all variables and arrays are lost. The SCRATCH command also
purges all variables, arrays, subprograms, and stored state names (stored
states are explained in chapter 3).
General Purpose Math
You can use general purpose math expressions, following standard BASIC
language conventions, from either the front-panel keyboard, the system
controller, or within 3458A subprograms. The standard math operators,

Table of Contents

Other manuals for Agilent Technologies 3458A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 3458A and is the answer not in the manual?

Agilent Technologies 3458A Specifications

General IconGeneral
BrandAgilent Technologies
Model3458A
CategoryMultimeter
LanguageEnglish

Related product manuals