
Header Files
7-5
Run-Time-Support Functions
7.2.1 Diagnostic Messages
(assert.h)
The assert.h header defines the assert macro, which inserts diagnostic failure
messages into programs at run time. The assert macro tests a run-time
expression.
-
If the expression is true (nonzero), the program continues running.
-
If the expression is false, the macro outputs a message that contains the
expression, the source file name, and the line number of the statement
that contains the expression; then, the program terminates (using the
abort function).
The assert.h header refers to another macro named NDEBUG (assert.h does
not define NDEBUG). If you have defined NDEBUG as a macro name when
you include assert.h, then assert is turned off and disabled. If NDEBUG
is not
defined, then assert is enabled.
The assert function is listed in Table 7
7.2.2 Character-Typing and Conversion
(ctype.h)
The ctype.h header declares functions that test (type) and convert characters.
The character-typing functions test a character to determine whether it is a
letter, a printing character, a hexadecimal digit, etc. These functions return a
value of
true
(a nonzero value) or
false
(0). Character-typing functions have
names in the form is
xxx
(for example,
isdigit
).
The character conversion functions convert characters to lower case, upper
case, or ASCII and return the converted character. Character-conversion
functions have names in the form to
xxx
(for example,
toupper
).
The ctype.h header also contains macro definitions that perform these same
operations. The macros run faster than the corresponding functions. The
typing macros expand to a lookup operation in an array of flags (this array is
defined in ctype.c). The macros have the same name as the corresponding
functions, but each macro is prefixed with an underscore (for example,
_isdigit
). Use the function version, if an argument passed that has side effects.
The character typing and conversion functions are listed in Table 7
3 (b) page
Содержание TMS320C2x
Страница 8: ...viii...
Страница 69: ...2 47 C Compiler Description...
Страница 159: ...6 36...
Страница 226: ...8 6...
Страница 250: ...Index Index 14 Z z shell option 2 2 2 4 2 14 overriding with c option 4 5 overriding with n option 2 13...