Section 7. Installation
142
with (x,y,z) being the indices, have (x • y • z) number of variables in a cubic x-by-
y-by-z matrix. Dimensions greater than three are not permitted by CRBasic.
When using variables in place of integers as dimension indices (see CRBasic
example Using Variable Array Dimension Indices
(p. 142))
, declaring the indices As
Long variables is recommended. Doing so allows for more efficient use of
CR3000 resources.
Using Variable Array Dimension Indices
'This program example demonstrates the use of dimension indices in arrays. The variable
'VariableName is declared with three dimensions with 4 in each index. This indicates the
'array has means it has 64 elements. Element 24 is loaded with the value 2.718.
'
Dim
aaa
As Long
Dim
bbb
As Long
Dim
ccc
As Long
Public
VariableName(4,4,4)
As Float
BeginProg
Scan
(1,sec,0,0)
aaa = 3
bbb = 2
ccc = 4
VariableName(aaa,bbb,ccc) = 2.718
NextScan
EndProg
7.6.3.3.3 Dimensioning String Variables
Strings can be declared to a maximum of two dimensions. The third "dimension"
is used for accessing characters within a string. See String Operations
(p. 327).
String length can also be declared. See table Data Types in Variable Memory.
(p.
A one-dimension string array called StringVar, with five elements in the array
and each element with a length of 36 characters, is declared as
Public
StringVar(5)
As String
* 36
Five variables are declared, each 36 characters long:
StringVar(1)
StringVar(2)
StringVar(3)
StringVar(4)
StringVar(5)
7.6.3.3.4 Declaring Flag Variables
A flag is a variable, usually declared As Boolean
(p. 531),
that indicates True or
False, on or off, go or not go, etc. Program execution can be branched based on
the value in a flag. Sometime flags are simply used to inform an observer that an
event is occurring or has occurred. While any variable of any data type can be
used as a flag, using Boolean variables, especially variables named "Flag", usually
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: ......