| GetValue | Function (ROM Call 0x2CB)

AMS 1.01 or higher | estack.h

long GetValue (CESI ptr, long low, long high);

Converts entry on the expression stack to short integer and checks whether it is in a given range.

GetValue converts an entry on the expression stack pointed to by ptr (it needs to point on the entry tag) to a short integer value using estack_to_short or estack_to_ushort, depending on the sign of low. Then, a "Domain Error" is thrown if the value is smaller than low or greater than high, otherwise the value will be returned as the result of the function. It will also throw a "Data type" error if the entry can not be represented as an integer.

Uses: estack_to_short, estack_to_ushort, primary_tag_list
Used by: cmd_andpic, cmd_circle, cmd_cyclepic, cmd_dialog, cmd_line, cmd_linehorz, cmd_linevert, cmd_newpic, cmd_newplot, cmd_plotsoff, cmd_plotson, cmd_popup, cmd_ptchg, cmd_ptoff, cmd_pton, cmd_pttext, cmd_pxlchg, cmd_pxlcircle, cmd_pxlhorz, cmd_pxlline, cmd_pxloff, cmd_pxlon, cmd_pxltext, cmd_pxlvert, cmd_rclpic, cmd_rplcpic, cmd_shade, cmd_stopic, cmd_xorpic, push_identity_mat, push_list_to_mat, push_mrow, push_mrowadd, push_newlist, push_newmat, push_part, push_pttest, push_pxltest, push_randmat, push_rowadd, push_rowdim, push_rowswap, push_submat