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
Содержание CR1000
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 32: ......
Страница 36: ......
Страница 38: ......
Страница 40: ......
Страница 60: ...Section 4 System Quickstart Figure 16 PC200W View Line Graph 60 ...
Страница 96: ......
Страница 98: ...98 ...
Страница 302: ......
Страница 350: ...Section 8 Operation Figure 91 Pulse Sensor Output Signal Types Figure 92 Switch Closure Pulse Sensor 350 ...
Страница 453: ...Section 8 Operation Figure 115 Using the Keyboard Display 453 ...
Страница 454: ...Section 8 Operation 8 8 1 Data Display Figure 116 Displaying Data with the Keyboard Display 454 ...
Страница 456: ...Section 8 Operation Figure 118 Real Time Custom 456 ...
Страница 457: ...Section 8 Operation 8 8 1 3 Final Memory Tables Figure 119 Final Memory Tables 457 ...
Страница 458: ...Section 8 Operation 8 8 2 Run Stop Program Figure 120 Run Stop Program 458 ...
Страница 460: ...Section 8 Operation Figure 122 File Edit 460 ...
Страница 461: ...Section 8 Operation 8 8 4 PCCard Memory Card Display Figure 123 PCCard CF Card Display 461 ...
Страница 478: ......
Страница 506: ......
Страница 536: ......
Страница 636: ......
Страница 642: ......
Страница 644: ......
Страница 676: ......
Страница 677: ......