EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Software Guide

Texas Instruments TI-89
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #76 background imageLoading...
Page #76 background image
64
Section 2: Compiler
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
Using the enumeration constant assignment capability, it is possible (and legal)
to create different enumeration constants with the same integer values.
Enumeration constants are integer type objects and are treated the same as
numerical integer constants (i.e., their values cannot be modified). They can be
used anywhere an integer constant can be used except in an assignment to an
enumeration variable of a different
enum
type. Enumeration constants within the
same block scope must have unique names so that they can be distinguished
from each other as well as other variables, functions, and
typedef
names.
Variables and other objects of enumeration type can be declared in the
declaration containing the type definition (as in the above example) or in
subsequent declarations that specify the enumeration type name. If subsequent
declarations will not be made, the enumeration type name (
enum
tag) can be
omitted from the initial declaration. For example, the following three sets of
declarations are equivalent:
enum { sunny, overcast, rainy } CA, FL, NJ;
enum weather { sunny, overcast, rainy } CA, FL, NJ;
enum weather { sunny, overcast, rainy };
enum weather CA, FL;
enum weather NJ;
The
enum
tag (
weather
in the above example) is placed into the same name
space as
struct
and
union
tags.
Enumeration variables and objects are treated the same as integers except in
assignments that involve incompatible enumeration types. An enumeration type
is the same size as an
int
unless the
-XN
flag is specified. When this flag is
specified, the size of an enumeration type is determined by the values of its
associated enumeration constants. If the value of each enumeration constant fits
in a
signed
char
, the enumeration type is the same size as a
char
. If the value
of each enumeration constant fits in a
signed short int
, the enumeration type is
the same size as a
short int
. Otherwise, the enumeration type is the same size
as an
int
.

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals