Allow.menu
The allow.menu command enables or disables display of the menu.
Syntax
allow.menu(byt A);
Remarks
This command allows for additional control over the display of the menu. Calling the allow.menu command with A = 0 resets an internal menu control value to FALSE; using a non-zero argument sets the internal value to TRUE. This internal value is TRUE by default when AGI starts.
When AGI attempts to display a menu (after a call to the menu.input command with reserved flag f14 (menu enabled) set to TRUE), it checks the value of the internal 'allow.menu' flag; if it is FALSE, then the menu is not displayed.
Possible Errors
Keep in mind that once menu.input successfully triggers the menu, AGI will continue attempting to display the menu in every interpreter cycle until is succeeds. So once menus are 're-allowed' by the allow.menu command the menu will immediately be displayed at the start of the next cycle.
Example
<syntaxhighlight lang="agi"> [ assume a menu has been created and submitted [ and f14 is set allow.menu(0); [ menu is disabled menu.input(); [ this menu input command tells AGI to show the menu
[ but with menu disabled, it will not display the menu
... allow.menu(1); [ menu is re-enabled; at the start of the next
[ cycle, the menu will be displayed
</syntaxhighlight>
Technical Information
Required Interpreter Version: | 3.002.086 and above |
Byte-Code Value: | 177 (0xB1 hex) |