EasyManuals Logo

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1032 background imageLoading...
Page #1032 background image
990
Appendix A: System Routines — Strings
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
strchr
Declaration:
char *
strchr
(const char *
str
, int
c
)
Category(ies):
Strings
Description:
Locates the first occurrence of the character
c
in the string pointed to by
str
. The character
c
may be any character including the null character (\0).
Inputs:
str
Character string to search.
c
Character to locate.
Outputs:
Returns a pointer to the first occurrence of
c
in
str
. If
c
is not in
str
,
strchr
returns a null pointer.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: strrchr, memchr, strspn, strcspn, strpbrk, strstr
Example:
short KeyYesOrNo( WORD Key )
/* If Key is ENTER or is an alpha and in XR_YesStr return TRUE,
if it is ESC or is an alpha and in XR_NoStr return FALSE,
otherwise return -1.
*/
{
if (Key == KB_ENTER)
return TRUE;
if (Key == KB_ESC)
return FALSE;
if (Key <= 0xFF) {
if (strchr(XR_stringPtr(XR_YesStr), (BYTE) Key ))
return TRUE;
if (strchr(XR_stringPtr(XR_NoStr), (BYTE) Key ))
return FALSE;
}
return -1;
}

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals