Section 7. Installation
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.8.4.2 Single-Statement Declarations
Single-statements are used to declare variables, constants, variable and constant
related elements, and the station name. The following instructions are used
usually before the
BeginProg
instruction:
•
Public
•
Dim
•
Constant
•
Units
•
Alias
•
StationName
The table
Rules for Names
(p. 159)
lists declaration names and allowed lengths. See
the section
Predefined Constants
(p. 138)
for other naming limitations.
7.8.4.3 Declaring Variables
A variable is a packet of memory that is given an alphanumeric name.
Measurements and processing results pass through variables during program
execution. Variables are declared as
Public
or
Dim
.
Public
variables are
viewable through
numeric monitors
(p. 521).
Dim
variables cannot be viewed. A
public variables can be set as read-only, using the
ReadOnly
instruction, so that it
cannot be changed from a numeric monitor. The program, however, continues to
have read/write access to the variable.
Declared variables are initialized once when the program starts. Additionally,
variables that are used in the
Function()
or
Sub()
declaration, or that are declared
within the body of the function or subroutine, are local to that function or
subroutine.
Variable names can be up to 39 characters in length, but most variables should be
no more than 35 characters long. This allows for four additional characters that
are added as a suffix to the variable name when it is output to a data table.
Variable names can contain the following characters:
•
A to Z
•
a to z
•
0 to 9
•
_ (underscore)
•
$
Names must start with a letter, underscore, or dollar sign. Spaces and quote
marks are not allowed. Variable names are not case sensitive.
129
Summary of Contents for CR1000
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 36: ......
Page 38: ......
Page 40: ......
Page 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Page 96: ......
Page 98: ...98 ...
Page 302: ......
Page 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Page 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Page 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Page 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Page 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Page 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Page 478: ......
Page 506: ......
Page 536: ......
Page 636: ......
Page 642: ......
Page 644: ......
Page 676: ......
Page 677: ......