TokenizeSymName Function (ROM Call 0x80)

estack.h

ESI TokenizeSymName (const char *src, unsigned short Flags);

Tokenizes a C string into a symbol name.

TokenizeSymName converts a symbol name pointed to by src, which is an ordinary ANSI C string, into a tokenized form, and pushes the tokenized form on the expression stack. After pushing, the new value of top_estack points to the variable tag on the expression stack. TokenizeSymName returns the old value of top_estack (which you can use to restore top_estack), or NULL_INDEX if the symbol name was invalid.

The parameter Flags is a set of binary flags from TokenizeSymNameFlags with the following meaning:

TSF_FULLY_QUALIFIED Add current default folder to the name if no folder specified in the name (do not use if tokenizing standalone folder names).
TSF_ALLOW_RESERVED Allow reserved names to be tokenized (otherwise they cause throwing an error).
TSF_PASS_ERRORS Throw errors instead of returning NULL_INDEX.

Note: This routine may cause heap compression.


Uses: next_expression_index, push_parse_text, top_estack, ER_catch, ER_success, ER_throwVar, strcat, strchr, strlen, OSDisableBreak, OSEnableBreak, FirstNonblank, IsMainFolderStr, SymSysVar
Used by: cmd_newplot, VarNew, VarOpen, VarSaveAs, handleRclKey, TokenizeName, VarStoreLink


See also: StrToTokN