| cmd_request | Function (ROM Call 0x384)

AMS 1.01 or higher | bascmd.h

void cmd_request (CESI PromptStr, SYM_STR SymName);

Executes TI-Basic 'Request' command.

cmd_request displays a dialog box without a title which contains only a request box (i.e. an input line box) and two buttons ("OK" and "Cancel"). The parameter PromptStr should point to the tag of a string item which describes a prompt of at most 20 characters which will appear in front of the request box, and SymName should point to the variable tag of the name of a TI-Basic variable (see SYMSTR). If this variable exists and contains a string value, this value will be displayed and highlighted in the input box as the default choice, else the input box will be empty. Either way, if the user presses 'ENTER', the value from the input box will be stored in this variable as a string value (it will be created if it does not exist, except if the user presses the 'ESC' key).
Note: See the dialogs.h header file for much more flexible methods to create dialog boxes.

Uses: HeapFree, HeapFreeIndir, HeapLock, HeapRealloc, DialogAdd, DialogDo, DialogNew, ER_catch, ER_success, ER_throwVar, HToESI, next_expression_index, push_zstr, top_estack, memset, strcat, strlen, strncpy, NeedStack, primary_tag_list, push_simplify, DerefSym, SetOK, VarRecall, VarStore, ROM Call 0x480

See also: cmd_text, cmd_dialog, dialogs.h