FutureBasic Logo

<<    Index    >> FutureBasic

on menu   statement



Syntax
on menu {fn userFunction|gosub{lineNumber|"stmtLabel"}}

Description
This statement designates a particular function or subroutine as a menu-event handling routine. A menu-event handling routine is called in response to the user selecting an item from a menu.

Note
If you use the on menu fn userFunction syntax, then userFunction must refer to a function which was defined or prototyped at an earlier location in the source code. Your menu-event handling function should not return a result.

Menu-event Handling Function Example
Shows both the menu function and a menu event handling function. The examples assume a menu event handling function as been designated with the name "DoMenu" via a on menu fn DoMenu.

local fn DoMenu( menuID as long, itemID as long )
...
end fn

See also
HandleEvents