MENU Statement

Summary: Syntax

menuID MENU [[loadoption]] [[memoption]]
BEGIN
itemdefinitions
END

The MENU statement defines the contents of a menu resource. A menu resource is a collection of information that defines the appearance and function of an application menu. A menu is a special input tool that lets a user select commands from a list of command names.

The menuID field specifies a name or number used to identify the menu resource.

The optional loadoption field takes a keyword that specifies when the resource is to be loaded. It must be one of the following:

PRELOAD

Resource is loaded immediately.

LOADONCALL

Resource is loaded when called. This is the default option.

The optional memoption field takes the following keyword or keywords, which specify the memory status of the resource:

FIXED

Resource remains at a fixed memory location.

MOVEABLE

Resource can be moved if necessary to compress memory.

DISCARDABLE

Resource can be discarded if no longer needed.

The default is both MOVEABLE and DISCARDABLE.

The itemdefinitions field specifies special resource statements that define the items in the menu. These statements are defined in the following sections.

The following is an example of a complete MENU statement:

sample MENU

BEGIN

MENUITEM “&Soup”, 100

MENUITEM “S&alad”, 101

POPUP “&Entree”

BEGIN

MENUITEM “&Fish”, 200

MENUITEM “&Chicken”, 201, CHECKED

POPUP “&Beef”

BEGIN

MENUITEM “&Steak”, 301

MENUITEM “&Prime Rib”, 302

END

END

MENUITEM “&Dessert”, 103

END