defines three integer constants called enumerators and assigns values to
them. Since enumerator values are by default assigned increasing from 0,
this is equivalent to writing
const PORTA=0 ;
const PORTB=1 ;
const PORTC=2 ;
An enumeration can be named. For example:
enum boolean {NO, YES};
The first name (NO) in an enum statement has the value 0, the next has
the value 1. The entries in the enumeration list are assigned constant
integer values. These values are limited within the range 0 to 255. Although
variables of the enum type may be declared, the Holtek C compiler will not
check whether what was stored in such a variable is a valid value for the
enumeration. Nevertheless, the enumeration variables offer the chance of
checking and as a result is a better method than #define.
Escape Character
Description
Hex Value
\a
\b
\f
\n
\r
\r
\v
\\
\?
\’
\"
alert (bell) character
backspace sharacter
form feed character
new line character
carriage return character
horizontal tab character
vertical tab character
backslash
question mark character
single quote (apostrophe)
double quote character
07
08
0C
0A
0D
09
0B
5C
3F
27
22
Operators
An expression is a sequence of operators and operands that specifies a
computation. An expression follows the rules of algebra, may result in a
value and may cause side effects. The order of evaluation of subexpressions
is determined by the precedence and grouping of the operators. The usual
mathematical rules for associativity and commutativity of operators may
be applied only where the operators are really associative and commuta-
tive. The different types of operators are discussed in the following.
HT-IDE User’s Guide
90
Содержание HT-IDE
Страница 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Страница 12: ...HT IDE User s Guide 2 ...
Страница 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Страница 24: ...HT IDE User s Guide 14 ...
Страница 70: ...HT IDE User s Guide 60 ...
Страница 76: ...HT IDE User s Guide 66 ...
Страница 92: ...HT IDE User s Guide 82 ...
Страница 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Страница 94: ...HT IDE User s Guide 84 ...
Страница 148: ...HT IDE User s Guide 138 ...
Страница 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Страница 154: ...HT IDE User s Guide 144 ...
Страница 192: ...HT IDE User s Guide 182 ...
Страница 194: ...HT IDE User s Guide 184 ...
Страница 218: ...HT IDE User s Guide 208 ...
Страница 235: ...P a r t V Appendix Part V Appendix 225 ...
Страница 236: ...HT IDE User s Guide 226 ...
Страница 250: ...HT IDE User s Guide 240 ...