Constants; Floating-Point Constants; Integer Constants - Texas Instruments TI-89 Software Manual

Sierra c assembler
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

54
declarations. The Sierra C compiler treats bit fields as unsigned objects by
default. The signed keyword can be used to treat bit fields as signed objects.
2.7.

Constants

The C compiler recognizes four types of constants: floating-point, integer,
character, and enumeration. Every constant has a type that is determined by its
form and value, as described in this section. All constants are non-negative in the
absence of overflow. If there is a minus sign preceding a constant, it is
recognized as a unary operator applied to the constant, and not as part of the
constant itself.
2.7.1.

Floating-Point Constants

A floating-point constant may be written with a decimal point, a signed exponent,
and/or a type specifier suffix. The exponent consists of the letter e or E followed
by an optionally signed decimal constant. The type specifier is one of the letters
f, F, l, or L. Either the decimal point or the exponent must be present for the
constant to be recognized as a floating-point type.
Examples of floating-point constants include:
The digit sequences are interpreted as decimal numbers. The exponent indicates
the power of 10 by which the value to the left of the exponent is to be multiplied.
Note: All floating-point constants, whether they are written with a suffix or without a suffix, are
2.7.2.

Integer Constants

An integer constant begins with a decimal digit and contains no decimal point or
exponent. It can have a prefix that specifies its base and a suffix that specifies its
type. The type specifiers are the letters u, U, l, and L, where u (or U) and l (or L)
can be used together in either order. The u (or U) specifier coerces the constant
to an unsigned type, and the l (or L) specifier coerces the constant to a long
int.
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual
0.
5e9
1.0
5E+9l
.0
5e+9L
.1
.50e-8
of type double (10 byte TI BCD floating point).
3.1415
0.31415E1F
31415.e-4
31415e-4f
Not for Distribution
Section 2: Compiler
Beta Version February 2, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-89 plusTi-92 plus

Table of Contents