Summary Of If - LeCroy SDA Operator's Manual

Serial data analyzer
Table of Contents

Advertisement

Z = 17
Else_
Z = 31
End If
Else_
If A > 3 Then
Z = 63
Else
Z = 127
End If
End If
If A > 0 Then
If B > 0 Then
Z = Y
End If
End If
This is equivalent to:
If ( (A > 0) And (B > 0) ) Then
Z = Y
End If
Summary of If . . . . Then . . . . Else
If Boolean Then AnyVBScriptingOnOneLine
If Boolean Then
AnyVBScriping
End If
If Boolean Then
AnyVBScripting
Else
AnyOtherVBScripting
End If
If you write a list like this, all the Booleans will be evaluated, whether you want that or not:
If A > 9 Then VBScripting1
If A > 7 Then VBScripting2
If A > 6 Then VBScripting3
If A > 4 Then VBScripting4
If A > 3 Then VBScripting5
If A > 1 Then VBScripting6
Be very careful when testing for equality. There will be no trouble with Integers, Long Integers,
and Strings, but Real numbers are different. Because they have so many significant digits, values
that should be equal, may differ minutely after a computation. It is safer with Real numbers to test
using a tolerance band.
SDA-OM-E Rev H
SDA Operator's Manual
257

Advertisement

Table of Contents
loading

Table of Contents