SymFindPtr Function (ROM Call 0x283)

vat.h

SYM_ENTRY *SymFindPtr (SYM_STR SymName, unsigned short Flags);

Finds a symbol and returns a pointer to the VAT entry.

SymFindPtr acts like SymFind and related functions, but instead of a HSym structure, it returns a pointer to the actual VAT entry. SymFindPtr returns NULL in case of an error. So, it acts somewhat as a combination of SymFind and DerefSym.

Flags is an additional argument which determines the searching method. It is a set of binary flags. The exact meaning of these flags are still unknown for me, but at the moment, I know the following for sure:

What I also know is that if b15 in Flags is set, the search is somewhat related to the folder list, and it is possible to search for folders as well. But I still can't conclude the exact meaning of these flags. So, instead of giving uncertain information, I will stop here. Everything about this function presented so far is certainly true. Fortunately, the TIOS set of VAT functions is rich enough so that eventual additional possibilities of this function may be simulated using other known functions. Any additional information will be welcomed, if someone knows more than me.

As an example of usage, this is a legal method how to lock a variable named "tetris":
SymFindPtr(SYMSTR("tetris"),0)->flags.bits.locked = 1;
See SYMSTR for info about symbol names.


Uses: CheckSysFunc, FolderAdd, SymCmp, DlgMessage, XR_stringPtr, ParseSymName, _mu16u16
Used by: SymAddTwin, SymDel, SymFind, SymFindMain, SymMove, VarRecall, VarStore, GraphOrTableCmd, ROM Call 0x439


See also: SymFind, SymFindMain, SymFindHome