CheckSysFunc Function (ROM Call 0x89)

vat.h

short CheckSysFunc (const char *VarName, unsigned short *Index);

Checks for graph functions and other special variable names.

CheckSysFunc checks whether VarName (an ordinary C string) is a graph function or another special variable name. It returns zero if this is not the case, otherwise it returns the type of the variable.

Precisely, this function returns values from either GraphModes or ExtendedSysTypes, in addition to zero:

GR_FUNC "y1".."y99"
GR_PAR "xt1".."xt99", "yt1".."yt99"
GR_POL "r1".."r99"
GR_SEQ "u1".."u99"
GR_3D "z1".."z99"
GR_DE "y'1".."y'99"
SEQ_INITC "ui1".."ui99"
DE_INITC "yi1".."yi99"
DR_FLDPIC "FldPic"
SOLVER_SYS_VARS "Exp", "Eqn"
UNIT_VAR name with a leading underscore
C_COL "c1".."c99"
R_REGEQ "RegEq"

Note that ExtendedSysTypes also contains R_SYSVAR, which may be returned only by CheckReservedName. In fact, this function cannot check for system variable names like "xmin".

Also, if VarName is a valid graph function name or column name ("y1", "c1", etc.), CheckSysFunc stores the function/column index at the word pointed to by Index.


Uses: CTypeTable
Used by: CheckReservedName, FolderCur, SymFindPtr, SymSysVar, VarRecall, VarStore, cmd_archive, cmd_lock, cmd_movevar, cmd_newfold, cmd_unarchiv, cmd_unlock, VarOpen, ERD_process, sendcalc, ROM Call 0x437


See also: SymSysVar, CheckReservedName