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.
Содержание SDA
Страница 1: ...SERIAL DATA ANALYZER OPERATOR S MANUAL December 2007 ...
Страница 148: ...Standard Horizontal Parameter Help Markers Standard Vertical Parameter Help Markers 148 SDA OM E Rev H ...
Страница 223: ...SDA Operator s Manual Example 6 SDA OM E Rev H 223 ...
Страница 225: ...SDA Operator s Manual SDA OM E Rev H 225 ...
Страница 232: ...In this figure the panel has been pasted onto the Excel sheet for comparison 232 SDA OM E Rev H ...
Страница 243: ...SDA Operator s Manual This example used the CORREL Array1 Array2 function of Excel as depicted below SDA OM E Rev H 243 ...
Страница 246: ...246 SDA OM E Rev H ...
Страница 247: ...SDA Operator s Manual Excel Example 5 Using a Surface Plot SDA OM E Rev H 247 ...
Страница 279: ...SDA Operator s Manual Convolving two signals SDA OM E Rev H 279 ...
Страница 310: ...The jitter wizard is accessed from the Analysis drop down menu 310 SDA OM E Rev H ...
Страница 327: ...SDA Operator s Manual SDA OM E Rev H 327 ...
Страница 328: ...328 SDA OM E Rev H ...
Страница 394: ...394 SDA OM E Rev H ...
Страница 395: ...SDA Operator s Manual SDA OM E Rev H 395 ...