checkCurrent Function (ROM Call 0x121)

vat.h

HSym checkCurrent (SYM_STR SymName, ESQ Type);

Check for the existence of a symbol.

checkCurrent makes sure the given symbol exists and matches the requested tag Type. SymName is the symbol name (see SYMSTR for rules about SymName), and Type is the requested tag type (see VarNew for a list of valid tags). checkCurrent returns the HSym of the VAT entry if it exists and matches the requested tag type, otherwise it returns HS_NULL. For example, the text editor uses checkCurrent when it is told to edit the current text variable, to make sure the previous name entered by the user still exists and is a text variable. If it is not then it executes the code to prompt the user for a new text variable to edit.


Uses: DerefSym, SymCmp, SymFind, SymFindMain, HToESI, ROM Call 0x45A
Used by: cmd_newdata, GetStatValue