→
Line comment
A line comment begins with // and comments out all characters to the end
of the line, for example
// this is a line comment
Identifiers
The name of an identifier contains a sequence of letters, digits, and under
scores with the following rules:
The first character must not be a digit
•
Only the first 31 characters are significant
•
Upper case and lower case letters are different
•
Reserved words cannot be used
Reserved words
The following are the reserved words supported by the Holtek C complier.
They must be in lower case.
auto
bits
break
case
char
const
continue
default
do
else
enum
extern
for
goto
if
int
long
return
short
signed
static
struct
switch
typedef
union
unsigned
void
volatile
while
The reserved words double, float, register and sizeof are not supported
by the Holtek C compiler.
Data types and sizes
Only three basic data types are supported by the Holtek C compiler,
char
a single byte holding one character
int
an integer occupying one byte
void
an empty set of values, used as the type returned by functions that
generate no value
The following qualifiers are allowed
Qualifier
Applicable Data Type
Use
const
any
place the data in a ROM space
long
int
create a 16-bit integer
short
int
create an 8-bit integer
signed
char, int
create a signed variable
unsigned
char, int
create an unsigned variable
Chapter 9 Holtek C Language
87
Summary of Contents for HT-IDE
Page 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Page 12: ...HT IDE User s Guide 2 ...
Page 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Page 24: ...HT IDE User s Guide 14 ...
Page 70: ...HT IDE User s Guide 60 ...
Page 76: ...HT IDE User s Guide 66 ...
Page 92: ...HT IDE User s Guide 82 ...
Page 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Page 94: ...HT IDE User s Guide 84 ...
Page 148: ...HT IDE User s Guide 138 ...
Page 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Page 154: ...HT IDE User s Guide 144 ...
Page 192: ...HT IDE User s Guide 182 ...
Page 194: ...HT IDE User s Guide 184 ...
Page 218: ...HT IDE User s Guide 208 ...
Page 235: ...P a r t V Appendix Part V Appendix 225 ...
Page 236: ...HT IDE User s Guide 226 ...
Page 250: ...HT IDE User s Guide 240 ...