SDA Operator’s Manual
SDA-OM-E Rev H
253
Variable Names
Upper and lower case have no significance in VBS, either in variable names or in keywords (the
names reserved by the system), but it is a good idea to be consistent about the spelling of a
variable name to avoid confusion. At least 36 characters may be used in a variable name. These
can include any combination of alphabetic and numeric characters, and the underscore character.
No other punctuation character may be used in a variable name.
Do not use
any of the following characters in a variable name:
! @ & $ # ? , * . { } ( ) [ ] = + - ^ % / ~ < > : ;
Just use alphanumerics and underscore, for example: Example_Name
If you have to introduce constants, give them sensible names, just like variables. For example, do
not write:
_
If RMS < 23169 Then OutputY = Y
Its meaning may not be obvious to someone else.
It is better to write something like this:
FullScale = 32767
RootTwo = Sqr (2.0)
MaxRMS = FullScale / RootTwo
. . . . .
If RMS < MaxRMS Then . . . . .
But to keep your scripts fast, leave definitions like this outside your loops.
General usage
Note that white space has no effect, so you can introduce spaces for clarity, except of course
within variable names, function names and other keywords. Indenting control statements can be a
great help in understanding a program. For example:
For K = Kstart To Kstop
X = K * Sqr (3)
For N = NStart To Nstop
Y = N * N
If Y < FullScale Then
. . . . . .
. . . . . .
End If ' End of main calculation
Next ' End of N loop
Next ' End of K loop
If a section becomes very long, you could provide the end with a comment, to show where it
comes from.
Summary of Contents for SDA
Page 1: ...SERIAL DATA ANALYZER OPERATOR S MANUAL December 2007 ...
Page 223: ...SDA Operator s Manual Example 6 SDA OM E Rev H 223 ...
Page 225: ...SDA Operator s Manual SDA OM E Rev H 225 ...
Page 246: ...246 SDA OM E Rev H ...
Page 247: ...SDA Operator s Manual Excel Example 5 Using a Surface Plot SDA OM E Rev H 247 ...
Page 279: ...SDA Operator s Manual Convolving two signals SDA OM E Rev H 279 ...
Page 310: ...The jitter wizard is accessed from the Analysis drop down menu 310 SDA OM E Rev H ...
Page 327: ...SDA Operator s Manual SDA OM E Rev H 327 ...
Page 328: ...328 SDA OM E Rev H ...
Page 394: ...394 SDA OM E Rev H ...