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 #1040 background imageLoading...
Page #1040 background image
998
Appendix A: System Routines — Strings
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
strncpy
Declaration:
char *
strncpy
(char *
s1
, const char *
s2
, size_t
count
)
Category(ies):
Strings
Description:
Copies no more than
count
characters from the string pointed to by
s2
to
the character buffer pointed to by
s1
. The result will not be null terminated
if string
s2
is longer than
count
characters. If the objects pointed to by
s1
and
s2
overlap in memory, the behavior is undefined.
Inputs:
s1
Buffer to copy to.
s2
Character string to copy from.
count
Number of characters to copy.
Outputs:
Returns the value of
s1.
Assumptions:
s1
points to a buffer large enough to hold
count
characters.
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: strcpy
,
memcpy
,
memmove
Example:
short CustomError( short errCode, const BYTE *msg)
/* Create custom error message. */
{
BYTE buf[260];
memset( buf, 0, sizeof(buf) );
strncpy( (char *) buf, (char *) msg, 128 );
strcat( (char *) buf, "\n" );
strncat( (char *) buf, (char *) find_error_message(errCode), 128 );
return( DlgMessage((const char *) XR_stringPtr(XR_ERROR),
(const char *) buf, PDB_OK, 0) );
}

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