GetTagStr Function (ROM Call 0x46C)

AMS 2.00 or higher vat.h

char *GetTagStr (ESI tag, char * buf);

Returns the address of the string representing the special tag pointed to by tag.

tag needs to point to one of EXT_SYSTEM_TAG (0x1C), EXT_TAG (0xE3) or EXT_INSTR_TAG (0xE4), otherwise garbage is returned.
Also, if you pass GetTagStr a tag unrecognized by the AMS version, it returns a pointer to 'ERROR'.

Example: The TI-BASIC command ShowStat prints the string name for each statistical variable it finds using GetTagStr to print the name of the variable as shown in this example.

unsigned char tag[2];
char buf[24];
char buf2[11];
tag[0] = X_BAR_TAG; // in fact, any tag defined in SysvarTags.
tag[1] = EXT_SYSTEM_TAG; // Defined in Tags
sprintf(buf,"%-7s",GetTagStr(tag+1,buf2));
You can use HToESI to get a pointer to the tag stored in tag.


Uses: strlen, XR_stringPtr
Used by: cmd_showstat, Parse2DExpr, Parse2DMultiExpr