12.07.2015 Views

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

JYACC FORMAKER C Programmer's Guide Contents 1 ... - Prolifics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NAMESYNOPSISsm_choice - get item selection#include "smdefs.h"char *sm_choice (type)int type;DESCRIPTIONThis is a menu-handling function, similar in some respects to sm_menu_proc. Itenables you to tab, backtab, arrow and scroll through a screen, in order toselect the contents of one of the fields or scrolling items. The entry at whichthe cursor is positioned is shown in reverse video; fields that are blank intheir first position, and those without a MENU field edit, will be skipped.Hitting a key that matches the first character of a screen entry causes thecursor to be positioned there; if more than one entry begins with thatcharacter, the cursor is positioned to the first entry following its currentlocation. Entries are searched by field number. Arrays and scrolls, however, aresearched in their entirety following their first field, and scrolling occursautomatically. If type is UPPER (or LOWER), an alphabetic key is translated toupper (or lower) case before a match is attempted; if it is UPPER | LOWER, bothare tried; and if type has any other value, the entry is not translated.sm_choice returns to the calling program only when you hit the TRANSMIT or EXITkey. It ignores menu return codes attached to fields; the returned value is theresult of a call to sm_fptr.The functions sm_mp_options and sm_mp_string, which control the behavior ofsm_menu_proc, do not affect sm_choice.RETURNSThe contents of the selected field if TRANSMIT was hit, or 0 if EXIT washit.VARIANTS AND RELATED FUNCTIONSsm_menu_proc (type);sm_fptr (field_number);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!