262 Chapter 7 BASIC Language for the 3458A
• Local variables (all variables are global)
• Parameter passing
• Any other BASIC commands not listed in this supplement.
BASIC Language Commands
This section gives you an overview of the BASIC language commands that
are supported by the 3458A's internal BASIC language operating system.
Refer to the later sections in this chapter for more detailed information and
examples on these commands.
Variables and Arrays
Note All array indexes are 0 to size (option base 0).
LET user_variable = expression
REAL variable_l, variable_2, . . . Declares a type real user variable. Also
accepts REAL variable_l (size) for declaring a real array. REAL is a 64-bit
value.
INTEGER variable_l, variable_2, . . . Declares a type integer user variable.
Also accepts INTEGER variable_1 (size) for declaring an integer array.
INTEGER is a 16-bit value.
DIM array_name (size), . . . Dimensions an array.
FILL array_name, list Fills the named array with data from the following
number list. Filled arrays are stored in volatile memory space.
RESTRICTIONS ON USING
VA R I A B LE S I N
SUBPROGRAMS
ALL subprograms that refer to a given variable must define it. The definition
for a given variable must match all other definitions for the same variable
name. If the definition for a user variable varies between subprograms, you
may have problems when you cycle power. This is due to the way that the
subprograms are stored internally to conserve memory. The subprogram
executable code is actually rebuilt internally during the multimeter's
power-on start-up routines.
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.
Math Operations Numeric Operations: +, -, *, /, ^
=, >, <, >=, <=, <>