HP C/iX Reference Manual (31506-90011)
150 Chapter9
HP C/iX Implementation Topics
Lexical Elements
not enabled, and the result of such an operation is that defined by the standard. This
means, for example, that dividing a positive finite number by zero will yield positive
infinity, and no trap will occur. Dividing zero by zero or infinity by infinity will yield a NaN,
again with no trap. For a discussion of infinity arithmetic and operations with NaNs, in the
context of the IEEE standard, see the HP Precision Architecture and Instruction Set
Reference Manual.
Note that infinities and NaNs propagate through a sequence of operations. For example,
adding any finite number to infinity will yield infinity. An operation on a NaN will yield a
NaN. This means that you may be able to perform a sequence of calculations and then
check just the final result for infinity or NaN.
Lexical Elements
• Identifiers: 255 characters are significant in internal and external names.
• Character Constants: Any character constant of more than one character produces a
warning. The value of an integral character constant containing more than one
character is computed by concatenating the 8-bit ASCII code values of the characters,
with the leftmost character being the most significant. For example, the character
constant 'AB' has the value 256*'A'+'B' = 256*65+66 = 16706. Only the rightmost
four characters participate in the computation.
• The case of alphabetic characters is always significant in external names.
• The execution character set and the source character set are both ASCII.
• Nonprinting characters in character constants and string literals must be represented
as escape sequences.
Structures and Unions
Structure or union references that are not fully qualified (see example below) are flagged
with an error by the compiler.
struct{
int j;
struct {int i;}in;
} out;
out.i=3;
The correct statement for the example above is out.in.i = 3;.