Section 7. Installation
Table 20.
Rules for Names
Name
Category
1
Maximum Length
(number of
characters)
Allowed characters
Units
38
or underscore. CRBasic is not case sensitive.
Units are excepted from the above rules. Since
units are strings that ride along with the data,
they are not subjected to the stringent syntax
checking that is applied to variables, constants,
subroutines, tables, and other names.
Alias
39
Station name
64
Data-table name
20
Field name
39
Field-name
description
64
1
Variables, constants, units, aliases, station names, field names, data table names, and file names
can share identical names; that is, once a name is used, it is reserved only in that category. See
the section
Predefined Constants
(p. 138)
for another naming limitation.
7.8.4.14 Expressions in Arguments
Read More
See
Programming Express Types
(p. 160)
for more information on
expressions.
Many CRBasic instruction parameters allow the entry of arguments as
expressions. If an expression is a comparison, it will return
-1
if true and
0
if false.
(See the section
Logical Expressions
(p. 164))
. The following code snip shows the
use of an expressions as an argument in the
TrigVar
parameter of the
DataTable()
instruction:
'DataTable(Name, TrigVar, Size)
DataTable
(Temp, TC > 100, 5000)
When the trigger is
TC > 100
, a thermocouple temperature greater than 100 sets
the trigger to
True
and data are stored.
7.8.4.15 Programming Expression Types
An expression is a series of words, operators, or numbers that produce a value or
result. Expressions are evaluated from left to right, with deference to precedence
rules. The result of each stage of the evaluation is of type Long (integer, 32 bits) if
the variables are of type Long (constants are integers) and the functions give
integer results, such as occurs with
INTDV()
. If part of the equation has a
floating point variable or constant (24 bits), or a function that results in a floating
point, the rest of the expression is evaluated using floating-point, 24-bit math,
even if the final function is to convert the result to an integer, so precision can be
lost; for example,
INT((rtYear-1993)*.25)
. This is a critical feature to consider
when, 1) trying to use integer math to retain numerical resolution beyond the limit
of floating point variables, or 2) if the result is to be tested for equivalence against
another value. See section
Floating-Point Arithmetic
(p. 161)
for limits.
Two types of expressions, mathematical and programming, are used in CRBasic.
A useful property of expressions in CRBasic is that they are equivalent to and
often interchangeable with their results.
160
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: ......