[Main]
Name=cmd_table
Type=Function
Subtype=ROM Call
Header Files=bascmd.h
Definition=void cmd_table (ESI ExprEtc);
MinAMS=1.01
See Also=bascmd.h/cmd_blddata, bascmd.h/cmd_graph, bascmd.h/cmd_clrgraph

[ROM Call]
Index=$393

[Description]
Executes TI-Basic 'Table' command.

[Explanation]
cmd_table builds a table for the specified expression/function and displays
it on the screen by activating the Table application. This function expects
the following layout on the expression stack before calling, depending on the
current graph mode (<I>ExprEtc</I> should point to the last item):
<BR><BR>
<TABLE BORDER CELLPADDING="4">
<TR><TD>Graph mode</TD><TD>Requested layout on the expression stack</TD></TR>
<TR><TD VALIGN="TOP">Function graphing</TD><TD><A HREF="$$LINK(estack.h/Tags)">END_TAG</A> <I>var_name</I> <I>expression</I></TD></TR>
<TR><TD VALIGN="TOP">Parametric graphing</TD><TD><A HREF="$$LINK(estack.h/Tags)">END_TAG</A> <I>var_name</I> <I>y_expression</I> <I>x_expression</I></TD></TR>
<TR><TD VALIGN="TOP">Polar graphing</TD><TD><A HREF="$$LINK(estack.h/Tags)">END_TAG</A> <I>var_name</I> <I>expression</I></TD></TR>
</TABLE>
<BR>
Sequences, 3D functions and differential equations can not be tabulated using
this function.
Variable names are optional, i.e. they may be omitted. In such cases, default
variable names for current graph mode are used ("x" for function graphing,
"t" for parametric graphing, and "<FONT FACE="Symbol">q</FONT>" for polar graphing). For example, to
graph the function <CODE>sin(t)+sin(2t)</CODE> with respect to t (assuming
that the current graph mode is "Function" or "Polar"), you should do:
<PRE>push_quantum (VAR_T_TAG);
push_parse_text ("sin(t)+sin(2t)");
cmd_table (top_estack);
</PRE>
Or, you can avoid
<A HREF="$$LINK(estack.h/push_parse_text)">push_parse_text</A> by
transforming the expression into RPN manually (which is very easy):
<PRE>static ESQ rpn[] = {END_TAG, VAR_T_TAG, VAR_T_TAG, SIN_TAG,
  VAR_T_TAG, 2, 1, POSINT_TAG, MUL_TAG, SIN_TAG, ADD_TAG};
cmd_table (rpn + sizeof(rpn) - 1);
</PRE>
All expressions entered using cmd_table and
<A HREF="$$LINK(bascmd.h/cmd_graph)">cmd_graph</A> are remembered and assigned
increasing function numbers starting with 1. The currently selected 'Y='
functions are ignored. Use <A HREF="$$LINK(bascmd.h/cmd_clrgraph)">cmd_clrgraph</A> to
clear these functions (they will also be cleared after you go to the Y=
Editor application to re-enable the system 'Y=' functions).
See the TI-Basic manual for more info.
<BR><BR>
You can use <A HREF="$$LINK(bascmd.h/cmd_blddata)">cmd_blddata</A> as an alternative
to this function.

[References]
Out=events.h/EV_sendEvent, events.h/EV_startApp, graphing.h/gr_active, unknown.h/GraphOrTableCmd
Out_EV_eventLoop=1
