Borland C++ Builder: The Complete Reference



V
ariables and constants are manipulated by operators to form expressions. These
are the atomic elements of the C and C++ language. This chapter will examine
each element closely.

Identifier Names
The names that are used to reference variables, functions, labels, and various other
user-defined objects are called identifiers. Identifiers can vary from one to several
characters in length. C defines two kinds of identifiers: external and internal. An external
identifier will be involved in an external link process. These identifiers, called external
names,
include function names and global variable names that are shared between
source files. If an identifier is not used in an external link process, then it is internal.
This type, called an internal name, includes the names of local variables, for example.
The C language guarantees that at least the first 6 characters are significant for an
external identifier, as are the first 31 characters for an internal identifier. C++ Builder
recognizes the first 250 characters as being significant. (In C++, all characters are
significant.)

In an identifier, the first character must be a letter or an underscore with subsequent
characters being either letters, numbers, or the underscore. Here are some examples of
correct and incorrect identifier names:

Correct
Incorrect
Count
1count
test23
hi!there
high_balance
high..balance
In C/C++, upper- and lowercase are treated differently. Hence, count, Count, and
COUNT
are three separate identifiers. An identifier cannot be the same as a keyword,
and it should not have the same name as any function that you wrote or that is in the
standard library.

Data Types