EasyManua.ls Logo

Texas Instruments TI-89 - Isalpha

Texas Instruments TI-89
1398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1276
Appendix C: Macros — Character Classification / Conversion
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
isalpha
Declaration:
BYTE
isalpha
(BYTE
c
)
Category(ies):
Character Classification / Conversion
Description:
Return non-zero (true) if the given character is alphabetic (A . . . Z, and all
of the international alphabetic characters).
Inputs:
c
Character to test.
Outputs:
Non-zero if
c
is alphabetic, 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: isalnum
Example:
This example function converts a symbol name into tokenized format and
stores it in TokName. IT DOES NOT HANDLE RESERVED NAMES!
TokName must point to a buffer of MAX_SYM_LEN bytes, the tokenized
named is stored there starting at the end of the buffer.
BYTE *StrToTokN( BYTE *StrSymName, BYTE *TokName )
{ Access_AMS_Global_Variables;
BYTE c, *TokPtr = TokName+MAX_SYM_LEN;
c = tolower(*StrSymName);
if ((*StrSymName+1) == '\0' && isalpha(c) && isascii(c))
*TokPtr = ENCODE_LETTER(*StrSymName);
else {
TokPtr -= (short) (strlen((char *) StrSymName) + 2);
*TokPtr++= '\0';
strcpy( (char *) TokPtr, (char *) StrSymName );
}
return TokName + (MAX_SYM_LEN - 1);
}

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals