Section 7. Installation
146
•
perform a mathematical or logical operation for each element in a
dimension using scalar or similarly located elements in different arrays
and dimensions
Here are some syntax rules and behaviors. Given the array, Array(A,B,C):
•
The () pair must always be present, i.e., reference the array as Array() or
Array(A,B,C)().
•
Only 1 dimension of the array can be operated on at a time. To select the
dimension, negate the element index.
•
Operations will not cross from 1 dimension into another. We access
from the specified starting point to the end of the dimension, where the
dimension is specified by a negative or by default is the least significant.
•
If indices are not specified, or none have been negated, the least
significant dimension of the array will be assumed.
•
The offset into the dimension being accessed is given by A,B, and C in
Array(A,B,C)().
•
If the Array is referenced as Array(), then the starting point is assumed
Array(1,1,1) and the least significant dimensioned is accessed.
7.6.3.6 Declaring Local and Global Variables
Advanced programs may use subroutines
(p. 332)
or functions, each of which can
have a set of Dim variables dedicated to that subroutine or function. These are
called local variables. Names of local variable can be identical to names of
global variables
(p. 541)
and to names of local variables declared in other
subroutines and functions. This feature allows creation of a CRBasic library of
reusable subroutines and functions that will not cause variable name conflicts. If
a program with local Dim variables attempts to use them globally, the compile
error undeclared variable will occur.
To make a local variable displayable, in cases where making it public creates a
naming conflict, sample the local variable to a data table and display the data
element table in a numeric monitor
(p. 547).
When exchanging the contents of a global and local variables, declare each
passing / receiving pair with identical data types and string lengths.
7.6.3.7 Initializing Variables
By default, variables are set equal to zero at the time the datalogger program
compiles. Variables can be initialized to non-zero values in the declaration.
Examples of syntax are shown in CRBasic example Initializing Variables
(p. 146).
Summary of Contents for CR3000 Micrologger
Page 2: ......
Page 3: ......
Page 4: ......
Page 6: ......
Page 30: ......
Page 34: ......
Page 36: ......
Page 96: ......
Page 485: ...Section 8 Operation 485 8 11 2 Data Display FIGURE 110 Keyboard and Display Displaying Data ...
Page 487: ...Section 8 Operation 487 FIGURE 112 CR1000KD Real Time Custom ...
Page 491: ...Section 8 Operation 491 FIGURE 116 Keyboard and Display File Edit ...
Page 496: ......
Page 502: ......
Page 564: ...Section 11 Glossary 564 FIGURE 126 Relationships of Accuracy Precision and Resolution ...
Page 566: ......
Page 594: ......
Page 598: ......
Page 600: ......
Page 602: ......
Page 624: ......
Page 642: ......
Page 643: ......