Summary Of Select Case - LeCroy WaveRunner Xi series Operator's Manual

Oscilloscopes
Hide thumbs Also See for WaveRunner Xi series:
Table of Contents

Advertisement

Case 7, 15, 31, 63, 127 : Z = Y + X
Case Else : Z = 3
End Select
Case N assumes that the value o
foreseen or not. It should always
This is very much neater than a st
sure of exact equality, which allows you to compa
example. File for this example: Select
Summary of Select Case . . . . End Select
SelectCase VariableName
Case Alist : VBScriptingA
Case Blist : VBScriptingB
. . . .
Case Else
: VBScriptingElse_
End S
elect
Do . . . Loop
This constru
ction is useful when you do not know at programming time how many times the loop will be executed.
Here are some examples:
Do
AnyVBSCalculation
Loop Until D >
Pi
Do Until Z <
Y
AnyVBSCalcu
lation
Loop
Do
AnyVBSCalculation
Loop While D
<= Pi
Do While Y
>=Z
AnyVBSCalcul
ation
Loop
These con
structions enable you to make the test before or after the calculation. If before, the calculation might not
be done even one
time, if the condition for terminating were already true. With the condition at the end, the
calculation is don
e at least one time.
Sometimes you mig
ht want to exit the loop from somewhere inside: for example, if some kind of problem is
looming, such as the log
, you can use If . . . . Then Exit Do.
For this case
To make a
pause of 10 seconds you can write:
NewTime = Timer
+ 10.0
Do Loop Until Timer >= NewTi
where Tim
er is a clock function in the PC, which has a resolution of one second.
WRXi-OM-E Rev C
f N has
already
be inclu
ded.
ring of
Ifs and E
Case.Xls
VBScriptingElse can be empty.
arithm of a negative number.
me
been set. Case
Else is included to cover other cases, whether
lses, but remem
ber: you cannot use Select Case unless you are
re integers and strings only. Y
O
'
M
PERATOR
S
ou cannot put Case > 5, for
ANUAL
197

Advertisement

Table of Contents
loading

Table of Contents