BAR( ) Function

Example   See Also

Returns the number of the most recently chosen item from a menu defined with DEFINE POPUP or a menu item chosen from a Visual FoxPro menu.

Syntax

BAR( )

Returns

Numeric

Remarks

Each item on a menu is assigned a number with DEFINE BAR. When a menu item is chosen from the menu, BAR( ) returns the number assigned to that item. A program can branch to other routines based on the value that BAR( ) returns.

BAR( ) returns 0 if there is no active menu or if the user presses ESC to exit the menu.