Section 4. CRBasic – Native Language Programming
4-8
The CR9000 uses -1 rather than some other non-zero number because the
and
and
or
operators are the same for logical statements and binary bitwise
comparisons (see
and
and
or
in Section 8). The number -1 is expressed in
binary with all bits equal to 1, the number 0 has all bits equal to 0. When -1 is
anded with any other number the result is the other number, ensuring that if the
other number is non-zero (true), the result will be non-zero
4.6 Flags
Any variable can be used as a flag as far as logical tests in CRBasic are
concerned. If the value of the variable is non-zero the flag is high. If the value
of the variable is 0 the flag is low (Section 4.5). PC9000 looks for the variable
array with the name
Flag
when the option to display flag status is used in one
of the real time screens.
4.7 Parameter Types
Instructions parameters allow different types of inputs these types are listed
below and specifically identified in the description of the parameter in the
following sections or in PC9000 CRBasic help.
Constant
Variable
Variable or Array
Constant, Variable, or Expression
Constant, Variable, Array, or Expression
Name
Name or list of Names
Variable, or Expression
Variable, Array, or Expression
Table 4.7-1 list the maximum length and allowed characters for the names for
Variables, Arrays, Constants, etc.
TABLE 4.7-1. Rules for Names
Name for
Maximum Length
(number of characters)
Allowed characters
Variable or
Array
16
Letters A-Z, upper or lower
case, underscore “_”, and
numbers 0-9. The name
must start with a letter.
CRBasic is not case
sensitive.
Constant
16
Alias 16
Data Table
Name
8
Field name
16
Summary of Contents for CR9000
Page 6: ...CR9000 Table of Contents iv This is a blank page ...
Page 22: ...CR9000 Overview OV 16 This is a blank page ...
Page 26: ...Section 1 Installation 1 4 CR9000 FIGURE 1 1 3 CR9000 Battery Pack ...
Page 72: ...Section 3 CR9000 Measurement Details 3 28 This is a blank page ...
Page 88: ...Section 5 Program Declarations 5 6 This is a blank page ...
Page 217: ...This is a blank page ...