![LeCroy WaveRunner 104MXI Operator'S Manual Download Page 204](http://html1.mh-extra.com/html/lecroy/waverunner-104mxi/waverunner-104mxi_operators-manual_1866369204.webp)
W
AVE
R
UNNER
X
I
S
ERIES
204
WRXi-OM-E Rev B
You can, however, use one of the following:
On Error Resume Next
followed by some code that may make some attempt to deal with the problem, or at least to allow execution to
continue.
On Error GoTo 0
This cancels On Error Resume Next_
Speed of Execution
To maximize the speed of execution of a script, the most important thing you can do is to minimize the number of
operations that are performed inside loops. Anything done once only is unlikely to be an important source of
delay. Please note that VBS is much slower than the internal computations of the instrument, so do everything
you can to save time, unless time is irrelevant to the application.
Using an array element takes longer than using a single variable. Here is an example:
For K = 1 to Total
If X (K) > X (K - 1) Then
Y = Cos (X (K) ) * Sin (X (K) ) * Sqr (X (K) )
End If
Next
To do the same thing we could also write this, using the index only once:
OldXK = X (0)
For K = 1 To Total
XK = X (K)
If XK > OldXK Then
Y = Cos (XK) * Sin (XK) * Sqr (XK)
OldXK = XK
End If
Next
VBS runs slower than the "internal" calculations, because the scripts are interpreted. This could be serious for
calculations where many operations are needed on each sample, such as convolution, correlation, and long
digital filters.