![](https://csdnimg.cn/release/download_crawler_static/7158559/bg14.jpg)
Chapter
0
string
letter
decimal
point
standard
headers
resewed
Identifiers
You will find the
C
Standard hard to read from time to time. Remember
that it is cast intentionally in a kind of legalese.
A
standard must be precise
and accurate first. Readability comes a distant second. The document is not
intended to be tutorial.
X3Jll
also produced a Rationale to accompany the
C
Standard. If you are curious about why
X3Jll
made certain decisions, go
read that document. It might help. I emphasize, however, that the Rationale
is also not a tutorial on the
C
language.
Here are two quotes from the
IS0
C
Standard. The first quote introduces
the Library section of the
C
Standard. It provides a few definitions and lays
down several important ground rules that affect the library
as
a whole.
7.
Library
7.1 Introduction
7.1.1 Definitions of terms
A
string
is a contiguous sequence of characters terminated by and including the fust null
character.
AUpointer to
"
a string is a pointer to its initial (lowest addressed) character. The
"
length
"
of a string is the number of characters preceding the null character and its
"
value
"
is the sequence
of the values of the contained characters, in order.
A
letter
is a printing character in the execution character set corresponding to any of the
52
required lowercase and uppercase letters in the source character set, listed in 5.2.1.
The
decimal
-
point character
is the character used by functions that convert floating
-
point
numbers to or from character sequences to denote the beginning of the fractional part of such
character It is represented in the text and examples by a period, but may be changed
by the
setlocale
function.
Forward references: character handling (7.3). the
setlocale
function (7.4.1.1).
7.1.2 Standard headers
Each library function is declared in a
header.89
whose contents are made available by the
#include
preprocessing directive. The header declares a set of related functions, plus any
necessary types and additional macros needed
to facilitate their use.
The standard headers are
If a file with the same name as one of the above
<
and >delimited sequences, not provided as
part
of the implementation. is placed in any of the standard places for a source file to be included.
the behavior is undefined.
Headers may be included in any order, each may be included more than once in a given
scope,
with no effect different from being included only once, except that the effect of including
<assert.
h>
depends on the definition of
NDEBUG.
If used, a header shall be included outside
of any external declaration or definition, and it shall first be included before the first reference to
any of the functions or objects it declares, or to any of the types or macros it defines. However,
if the identifier is declared or defined in more than one header, the second and subsequent
associated headers may be included after the initial reference to the identifier. The program shall
not have any macros with names lexically identical to keywords currently
defmed prior to the
inclusion.
Forward references: diagnostics (7.2).
7.1.3 Reserved identifiers
Each header declares or defines all identifiers listed in its associated subclause, and optionally
declares or defines identifiers listed in its associated future library directions subclause and
identifiers which are always resewed either for any use or for use as file scope identifiers.
All identifiers that begin with an underscore and either an uppercase letter or another underscore
are always resewed for any use.