Section 7. Installation
125
7.6.3.1.1 Multiple Statements on One Line
Multiple short statements can be placed on a single text line if they are separated
by 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.6.3.1.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.
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
7.6.3.2 Single-Statement Declarations
Single-statements are used to declare variables, constants, variable and constant
related elements, station name, and hardware settings. The following instructions
are used usually before the
BeginProg
instruction:
•
Public
•
Dim
•
Constant
•
Units
Summary of Contents for CR800 Series
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 34: ......
Page 54: ......
Page 92: ......
Page 310: ......
Page 446: ...Section 8 Operation 446 8 11 2 Data Display FIGURE 100 CR1000KD Displaying Data ...
Page 448: ...Section 8 Operation 448 FIGURE 102 CR1000KD Real Time Custom ...
Page 449: ...Section 8 Operation 449 8 11 2 3 Final Storage Data FIGURE 103 CR1000KD Final Storage Data ...
Page 450: ...Section 8 Operation 450 8 11 3 Run Stop Program FIGURE 104 CR1000KD Run Stop Program ...
Page 452: ...Section 8 Operation 452 FIGURE 106 CR1000KD File Edit ...
Page 456: ......
Page 462: ......
Page 523: ...Section 11 Glossary 523 FIGURE 116 Relationships of Accuracy Precision and Resolution ...
Page 524: ......
Page 526: ......
Page 556: ......
Page 558: ......
Page 560: ......
Page 597: ......