Section 7. Installation
115
7.7.3.3 Command Line
CRBasic programs are made up of a series of statements. Each statement
normally occupies one line of text in the program file. Statements are made up of
instructions, variables, constants, expressions, or a combination of these.
"Instructions" are CRBasic commands. Normally, only one instruction is
included in a statement. However, some instructions, such as
If
and
Then
, are
allowed to be included in the same statement.
Lists of instructions and expression operators can be found in the
CRBasic
Programming Instructions
(p. 451)
section. A full treatment of each instruction and
operator is located in the
Help
files of
CRBasic Editor
, which is included with
LoggerNet
,
PC400
, and
RTDAQ
datalogger support software suites.
7.7.3.3.1 Multiple Statements on One Line
Multiple short statements can be placed on a single text line if they are separated
with a colon. This is a convenient feature in some programs. However, in
general, programs that confine text lines to single statements are easier for
humans to read.
In most cases, regarding statements separated by
:
as being separate lines is safe.
However, in the case of an implied
EndIf
, CRBasic behaves in what may be an
unexpected manner. In the case of an
If...Then...Else...EndIf
statement, where
the
EndIf
is only implied, it is implied after the last statement on the line. For
example:
If
A
then
B
:
C
:
D
does not mean:
If
A
then
B (implied
EndIf
) : C : D
Rather, it does mean:
If
A
then
B
:
C
:
D (implied
EndIf
)
7.7.3.3.2 One Statement on Multiple Lines
Long statements that overrun the
CRBasic Editor
page width can be continued on
the next line if the statement break includes a space and an underscore (
_
). The
underscore must be the last character in a text line, other than additional white
space. A line continuation allows a CRBasic statement (executable line of text) to
span more than one file line.
Note
CRBasic statements are limited to 512 characters, whether or not a line
continuation is used.
Examples:
Public
A, B, _
C,D, E, F
If
(A
And
B) _
Or
(C
And
D) _
Or
(E
And
F)
then
ExitScan
Summary of Contents for CR850
Page 2: ......
Page 4: ......
Page 6: ......
Page 26: ...Table of Contents 26...
Page 30: ...Section 2 Cautionary Statements 30...
Page 32: ...Section 3 Initial Inspection 32...
Page 35: ...Section 4 Quickstart Tutorial 35 Figure 2 Wiring panel...
Page 55: ...Section 4 Quickstart Tutorial 55 Figure 24 PC200W View data utility...
Page 78: ...Section 5 System Overview 78...
Page 80: ...Section 6 CR800 Specifications 80...
Page 267: ...Section 7 Installation 267 Figure 84 Running average signal attenuation...
Page 268: ...Section 7 Installation 268...
Page 384: ...Section 8 Operation 384 Figure 113 Using the keyboard display...
Page 387: ...Section 8 Operation 387 Figure 116 Real time custom...
Page 388: ...Section 8 Operation 388 8 8 1 3 Final Storage Tables Figure 117 Final storage tables...
Page 389: ...Section 8 Operation 389 8 8 2 Run Stop Program Figure 118 Run Stop Program...
Page 390: ...Section 8 Operation 390 8 8 3 File Display Figure 119 File display...
Page 396: ...Section 8 Operation 396...
Page 402: ...Section 9 Maintenance 402...
Page 450: ...Section 11 Glossary 450...
Page 504: ...Appendix A CRBasic Programming Instructions 504...
Page 526: ...Appendix B Status Table and Settings 526...
Page 530: ...Appendix C Serial Port Pinouts 530...
Page 536: ...Appendix E FP2 Data Format 536...
Page 550: ...Appendix F Other Campbell Scientific Products 550...
Page 565: ......