COMMAND Clause

 

COMMAND clause is used to specify the name, key, description and help number for a menu option. It also contains the statements that are executed when this option is activated.

 

Element

Description

Key List

A list of one or more keys that invoke the menu option

MENU Option

The clause that contains the name and description of a menu option

HELP Clause

The clause which contains help number corresponding to the menu option

 

COMMAND clause can contain a nested MENU statement.

 

Menu Option

 

The menu option clause contains the name of the menu option and the description. Both are optional. This clause has the following syntax:

 

 

Element

Description

Option

A character variable or a character string used as the name of a menu option

Description

A character variable or a character string used as the description of a menu option

Expression List

A 4GL expression that returns a name or a description of a menu option

 

There are two ways of specifying the option name and the description:

 

 

MENU "my_menu"

COMMAND KEY (F1) (curr_user||status), "Press to change the user"

 

If the description is longer than the line at which it is displayed, the excessive symbols are truncated from the right.

 

 

 

If a COMMAND clause contains no option name and no description, the menu option will not be visible for a user.

 

 

 

Related articles:

Accelerators