beautypg.com

Teledyne LeCroy WaveExpert 100H Operators Manual User Manual

Page 281

background image

Wave Expert

WE-OM-E Rev A

279

If A >= 0 Then

B = Sqr (A)

Else

B = 0

End If

and in fact you can make some very complex constructions using If, as in the examples below:

If A < 0 Then

If A < - 1 Then

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