Appendix C: Macros — Character Classification / Conversion
1283
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
isprint
Declaration:
BYTE
isprint
(BYTE
c
)
Category(ies):
Character Classification / Conversion
Description:
Return non-zero (true) if the given character is a printable character. The
only non-printable characters are the codes 0 . . . 0xA, and 0xC, 0xD.
Inputs:
c
— Character to test.
Outputs:
Non-zero if
c
is a printable character, zero otherwise.
Assumptions:
Access_AMS_Global_Variables is defined.
Side Effects:
None
Availability:
AMS 2.00 or above.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also:
Example:
The text-draw menu function in the grapher uses
isprint
to determine
which characters can be displayed on the graph screen as shown below.
WORD inKey;
.
.
.
/* inKey is the key-code for the key pressed by the user */
if (inKey < 0xFF && isprint(inKey)) {
WinAttr( w, A_REPLACE );
WinCharXY( w, x, y, (char) inKey, 1 );
.
.
.