Character Classification / Conversion; Isalnum - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Appendix C: Macros — Character Classification / Conversion

isalnum

Declaration:
BYTE isalnum (BYTE c )
Category(ies):

Character Classification / Conversion

Description:
Return non-zero (true) if the given character is alpha-numeric.
Inputs:
c
Outputs:
Non-zero if c is alpha-numeric, 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:
isalpha, isdigit
Example:
This example function returns 0 . . . 8 if passed the digits '1' . . . '9' and
9 . . . 34 if passed 'A' . . . 'Z' or 'a' . . . 'z'; all other characters return -1.
Note that the isascii function prevents any of the international alphabetical
characters from being used.
SINT SubChar2I( SINT c )
{
Access_AMS_Global_Variables;
if (isascii(c)) {
c = toupper(c);
if (isalnum(c) && c != '0')
return( ((c < 'A') ? (c - '1') : (c - ('0' + 'A'-'9'))) );
}
return -1;
}
TI-89 / TI-92 Plus Developer Guide
— Character to test.
Not for Distribution
1275
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents