User Tools

Site Tools


choice_return_relative_item_position_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== CHOICE (return relative item position) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

CHOICE( [control] )

blk2blue.jpg

CHOICE Returns a user selection number.
control A field equate label of a LIST, COMBO, SHEET, or OPTION control.

The CHOICE procedure returns the sequence number of a selected item in an OPTION structure, SHEET structure, LIST box, or COMBO control. With no parameter, CHOICE returns the sequence number of the selected item in the last control (LIST, SHEET, OPTION, or COMBO) that generated a Field-specific event to cycle the ACCEPT loop. CHOICE(control) returns the current selection number of any LIST, SHEET, OPTION, or COMBO in the currently active window.

CHOICE returns the sequence number of the selected RADIO control within an OPTION structure. The sequence number is determined by relative position within the OPTION. The first control listed in the OPTION structure's code is relative position 1, the second is 2, etc.

CHOICE returns the memory QUEUE entry number of the selected item when a LIST or COMBO box is completed.

Return Data Type: SIGNED

Example:

CODE

ACCEPT

 EXECUTE CHOICE() !Perform menu option

  AddRec          !procedure to add record

  PutRec          !procedure to change record

  DelRec          !procedure to delete record

  RETURN          !return to caller

 END

END

See Also:

LIST

SHEET

COMBO

OPTION

QUEUE

RADIO

PROP:Selected

PROP:ChoiceFEQ

choice_return_relative_item_position_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1