HP C A.06.05 Reference Manual

Program Organization
Lexical Elements
Chapter 2 13
case
An optional element in a switch statement. The case label is followed by an integral constant
expression and a (:) colon. No two case constant expressions in the same switch statement
can have the same value. For example:
switch (getchar())
{
case 'r':
case 'R':
moveright();
break;
...
}
char
The char keyword defines an integer type that is 1 byte long.
A char type has a minimum value of -128 and a maximum value of 127.
The numeric range for unsigned char is 1 byte, with a minimum value of 0 and a maximum
value of 255.
const
Specifies that an object of any type must have a constant value throughout the scope of its
name. For example:
/* declare factor as a constant float */
const float factor = 2.54;
The value of factor cannot change after the initialization.
continue
See “continue” on page 157.
default
A keyword used within the switch statement to identify the catch-all-else statement. For
example:
switch (grade){
case 'A':
printf("Excellent\n");
break;