| HToESI | Function (ROM Call 0x247)

estack.h

ESI HToESI (HANDLE Handle);

Converts a handle to an expression stack index.

HToESI is a simple but very useful routine. It returns a pointer to the last byte of the MULTI_EXPR structure referenced by Handle. Therefore it allows for the use of TIOS variables as input data in expression stack routines. Assuming that Handle is a handle of a TIOS variable which contains an expression, HToESI will return a pointer to the tag of the expression contained in the variable. Such a pointer may be used in any routine which needs an argument of type CESI, like NG_approxESI, etc. (except in functions which manipulate the actual memory space on the expression stack, like delete_between). In fact, HToESI simply dereferences Handle and adds the size plus 1 to the address. It also may be used to determine the type of a TIOS variable, because after execution the result points to the data type tag of the variable data.
Note: If the handle is not locked, HToESI must be called again after a heap compression since the block of memory associated with the handle may have moved.

Used by: NG_execute, NG_RPNToText, cmd_andpic, cmd_archive, cmd_blddata, cmd_custom, cmd_cyclepic, cmd_dialog, cmd_fill, cmd_get, cmd_newdata, cmd_popup, cmd_rclpic, cmd_request, cmd_rplcpic, cmd_showstat, cmd_sinreg, cmd_sorta, cmd_sortd, cmd_toolbar, cmd_unarchiv, cmd_xorpic, push_gettype, EV_defaultHandler, EV_eventLoop, handleRclKey, handleVarLinkKey, FFindFirst, FFindNext, FOpen, FType, GR3_paint3d, gdb_recall, HomeExecute, HomePushEStack, HS_getAns, LIO_Receive, OSLinkCmd, sendcalc, TE_handleEvent, de_initRes, de_loop, dv_create_graph_titles, EQU_select, EQU_setStyle, FindGrFunc, GetStatValue, GM_Derivative, GM_DistArc, GM_Inflection, GM_Integrate, GM_Intersect, GM_Math1, GM_TanLine, gr_ck_solvergraph, gr_de_value, gr_execute_seq, gr_find_el, gr_seq_value, InitTimeSeq, push_ans_entry, push_user_func, recall_data_var, Regraph, seqWebInit, setup_more_graph_fun, spike_geo_titles, spike_optionD, time_loop, tokenize_if_TI_92_or_text, unlock_more_graph_fun, VarStoreLink, checkCurrent, CheckLinkLockFlag, ClearUserDef, EM_moveSymToExtMem, VarRecall, VarStore, NG_setup_graph_fun, NG_cleanup_graph_fun, ROM Call 0x438, ROM Call 0x4D1