Chapter 7 BASIC Language for the 3458A 259
Chapter 7 BASIC Language for the 3458A
Introduction .........................................................261
How It Works ......................................................261
BASIC Language Commands .............................262
Variables and Arrays ...................................... 262
Math Operations .............................................262
Subprogram Definition/Deletion .................... 263
Subprogram Execution Commands ................263
Looping and Branching ..................................263
Binary Programs ............................................. 263
New Multimeter Commands ...............................264
3458A BASIC Language Example Program ....... 265
Sample Results From Program Execution: 266
Variables and Arrays ........................................... 266
Type Declarations ...........................................266
Type Conversions ........................................... 267
Using Variables ..............................................267
Variables for Data Storage ........................268
Numeric Calculations ................................268
Reading Multimeter Values ......................268
Arrays ............................................................. 268
Filling Arrays ............................................269
Array Size .................................................. 269
Purging Arrays and Variables ...................269
General Purpose Math .........................................269
Math Operators ............................................... 270
General Math Functions ............................ 270
Logarithmic Functions ..............................270
Trigonometric Functions ........................... 271
Logical Functions ...................................... 271
Binary Functions ....................................... 271
Math Hierarchy ...............................................272
Math Errors ..................................................... 272
Making Comparisons Work ........................... 272
Subprograms ........................................................273
Writing and Loading Subprograms .....................274
Subprogram Command Types ............................. 275
Definition/Deletion Commands .....................275
SUB/SUBEND .......................................... 275
DELSUB ...................................................275
SCRATCH ................................................276
CAT ...........................................................276
LIST ..........................................................276
COMPRESS ..............................................276
Execution Commands ..................................... 277
Subprogram CALL ....................................277
Subprogram PAUSE .................................277
Knowing When a Subprogram is Paused . 277
Aborting a Subprogram ............................ 277
Exiting a Subprogram ............................... 277
Nesting Subprograms ................................ 278
Conditional Statements in Subprograms ............. 278
FOR...NEXT Loops ....................................... 278
WHILE Loops ................................................ 279
IF...THEN Branching ..................................... 280