342
Appendix A: System Routines — Data Utilities
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
SmapTypeStrings
Declaration:
char *
SmapTypeStrings
(short
typeNum
);
Category(ies):
Data Utilities
Description:
Given the numeric type number of a variable (as returned by
GetDataType
), return the short (maximum four characters) string
representing the type of this variable. This is the string displayed in
VAR-LINK. This string is localized for the current language.
Inputs:
SDT_ASM, SDT_DATA, SDT_EXPR, SDT_FIG, SDT_FUNC, SDT_GDB,
SDT_LIST, SDT_MAC, SDT_MAT, SDT_MAT, SDT_OTH, SDT_PIC,
SDT_PRGM, SDT_STR, SDT_TEXT
Outputs:
Pointer to a static string representing the data type of
typeNum
. Note that
files (SDT_OTH) will return “OTH” and not the file type specified when the
file was opened.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: GetDataType, DataTypeNames
Example:
HANDLE hDat;
EStackIndex esi;
SYM_ENTRY *SymPtr;
BYTE szBuf[18];
.
.
.
/* Assuming szBuf contains the name of the variable, this code will tack
the 4 char (max) type onto szBuf.
*/
if (hDat = SymPtr->hVal) {
esi = HToESI( hDat ); /* point to data type tag */
strncpy( (char *) szBuf+13, SmapTypeStrings(GetDataType( esi )), 4 );
}