Please enable JavaScript to view this site.

A-Shell Consolidated Reference

xcall ACCESS, mnustr, char, extflg {,row, col}

ACCESS is a handy utility for implementing single-line, single-character selection menus. The menu is made up of one or more choices, where each choice is displayed as a single upper case character followed by a close parenthesis and one or more lower case characters. The upper case characters are used to make the selections, and must be unique. A typical menu might look something like this:  

A)dd C)hange D)elete Q)uit

Parameters

mnustr (null terminated String of appropriate length)  [in]

must be formatted exactly as displayed (see example above) except that the spaces between the items are optional. Also, the string may begin with one or more of the following shortcut letters (with no following parentheses):

Shortcut

Displays as

A

A)dd

C

C)hange

D

D)elete

S

S)can

I

I)nquiry

X

X)ternal

L

L)ist

 

For example, if mnustr = "ACDLP)ostQ)uit" the menu would appear as:

A)dd C)hange D)elete L)ist P)ost Q)uit

char  (String,1)  [in/out]

may be loaded with the character corresponding to the default option, and will be returned with the character entered by the user to make a selection. The user must enter one of the upper case characters in the list, or use Backspace, Escape, or a function key to exit.

extflg  (F,6)  [out]

will return 0 if a normal menu selection was made, or 1 if Backspace or Escape was hit, or a number in the range of negative 1 to negative 32 if a function key is hit. In order for the function keys to be accepted, you must have a <tdvname>.IFX file in the LIB: account which maps function keys according to the INFLD scheme (e.g. F1 = (Ctrl+G)+(Ctrl+A), F2 = (Ctrl+G)+(Ctrl+B), etc.).

row, col  [in]

may be optionally used to specify the starting position to display the menu. If row is 0 or not specified, the menu will be displayed starting from the position of the cursor at the time of the call.