push_string.hsf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. [Main]
  2. Name=push_string
  3. Type=Function
  4. Subtype=ROM Call
  5. Header Files=basfunc.h
  6. Definition=void push_string (CESI expr);
  7. MinAMS=1.01
  8. See Also=basfunc.h/push_str_to_expr, estack.h/push_zstr, estack.h/display_statements
  9. [ROM Call]
  10. Index=$326
  11. [Description]
  12. Executes TI-Basic 'string' function.
  13. [Explanation]
  14. push_string converts the expression pointed to by <I>expr</I> to a string and
  15. pushes this string on the expression stack. For example, after executing the
  16. code
  17. <PRE>push_shortint (100);
  18. push_quantum_pair (VAR_X_TAG, ADD_TAG);
  19. push_string (top_estack);
  20. </PRE>
  21. the string <CODE>"x+100"</CODE> will be pushed on the expression stack.
  22. See <A HREF="$$LINK(estack.h/top_estack)">top_estack</A>
  23. and <A HREF="$$LINK(estack.h/Tags)">Tags</A> for more info about this example.
  24. <BR><BR>
  25. Of course, <I>expr</I> may point to a string containing a variable name, but
  26. it must not point to an ordinary string. Otherwise the string is truncated
  27. at the first space (but not after the 8th character). If you only want to
  28. push a string (not an expression converted to a string), a method which
  29. always works would be:
  30. <PRE>push_expr_quantum (<I>expr</I>, STR_TAG);
  31. </PRE>
  32. [References]
  33. In=basfunc.h/push_median, basfunc.h/push_part, bascmd.h/cmd_sorta, bascmd.h/cmd_sortd, basfunc.h/push_format
  34. Out=alloc.h/HeapFree, estack.h/check_estack_size, estack.h/Parse1DExpr, estack.h/push_quantum, estack.h/push_quantum_pair, estack.h/top_estack, mem.h/memmove, string.h/strlen