Order Of Calculations; Vbs Controls - LeCroy WaveMaster 8600A Operator's Manual

X-stream oscilloscopes
Table of Contents

Advertisement

Order of Calculations

Operations are performed in the following order:
1. Contents of brackets
2. Exponentiation
3. Division and multiplication
4. Addition and subtraction
If there is any doubt as to how the calculation will be done, use brackets. These will also make the
order of the calculations clear to any reader of the program, which is desirable if you are to give it to
a customer, who will want to know what was intended.
Here are some examples of the uses of brackets:
Brackets are worked out before any other operations are performed.
Use brackets to force the result you want, and also to clarify a calculation.
A 1 1 1 1 1 1 1 1 255 0 1 0 1 1 0 1 0 90
B 1 1 1 1 0 0 0 0 240 0 0 0 0 0 0 0 0 0
C 1 0 1 0 1 0 1 0 130 1 1 1 1 1 0 1 0 250 B OR (C AND (D OR E))
D 0 1 0 1 0 1 0 1 85
E 0 0 0 0 1 1 1 1 15
F 0 0 0 0 0 0 0 0 0
Check these results to see whether any errors, deliberate or otherwise, have been introduced.
These results are from file Brackets.Xls. You can make a copy of that file in order to experiment
with different combinations of brackets.

VBS Controls

Do
Do
. . . .
. . . .
292
0 1 0 1 1 1 1 1 95
A 7
B 6
C 5
D 4
E 3
F 2
Do
. . . .
(B OR C) AND (D OR E)
B OR (C AND D) OR E
((B OR C) AND D) OR E)
315 A * B * (C / D) * E * F
8.75 A * B * C / (D * E * F)
35
A * B * (C / (D * E) ) * F
WM-OM-E Rev I

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents