Teledyne LeCroy WaveExpert 100H Operators Manual User Manual
Page 277

Wave Expert
WE-OM-E Rev A
275
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.
Arithmetic Operators
As with most other languages, the arithmetic operators are used as follows:
^ Exponentiation A ^ B = A
B
= A raised to the power B
/ Division
A / B = A divided by B
\ Integer division A \ B = A divided by B, truncated to next integer below
* Multiplication A * B = A multiplied by B
+ Addition
A + B = B added to A
- Subtraction
A B = B subtracted from A