Agilent Technologies E5071C Manual page 1102

Hide thumbs Also See for E5071C:
Table of Contents

Advertisement

Let us break down the code into a number of blocks and see what they do.
Line 10
This instruction mandates explicit declaration of variables.
Lines 30 to 310
The code enclosed between Sub Maximum() and End Sub will be executed
within the E5071C's macro environment. Thus enclosed code is called a
procedure. In this example, "Maximum" is the procedure name.
Lines 50 to 90
These lines declare data types of variables using Dim statements. A
statement is the minimum instruction unit based on the syntax. The
sample program declares the variable "q" as Variant, and the variables
"x(100)", "i", "n", "Start", "Last", "Num", and "Maximum" as Integer. For a
complete list of statements and data types supported by VBA, see VBA
Online Help.
Line 110
Any text preceded by a comment indicator (') is treated as a comment.
Lines 120 to 130
These lines use VBA's Array function to initialize the array. The q() array
contains elements delimited with commas in the ascending order of index
numbers (zero-based). A combination of a space and underscore (_) is
used to continue the statement across two or more lines.
Line 150
Stores the starting index number of the q array into the Start variable.
Line 160
Stores the last index number of the q array into the Last variable.
Line 170
Stores the number of elements in the q array into the Num variable.
Lines 190 to 210 and Lines 250 to 270
The code within each For ...Next statement is iterated until the counter
reaches the specific number.
Programming
1329

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents