MMCC's PL/B notes v1.10 |
509 Center Bay City, Michigan Sales (989) 892-9242             Support (989) 686-8860 MMCC Programming Standards
|
MMCC STANDARD MENU PROGRAM
Most MMCC applications are built around "menu" programs. There can be more than one level of menu and menu program.
Three variables are maintianed in COMMON storage and used when passing control from one program to another. This is not a hard and fast rule, but it is used in most cases:Some of our MENU programs have sub-menu's build into their code. To insure that we return to that sub-menu when the menu program is chained to, we use the common variable MENULINK. The main menu may load the "tools" sub-menu within it's own code. "Tools" chains to another program setting the menu as the "next program" and putting TOOLS in the MENULINK variable. When control returns to the menu program, it branches directly back to the tools sub-menu within it's own code.
- CURRPROG contains the name of the program being chained to. When the program is running we generally leave this name in the common variable. That means that we can display CURRPROG at any time and know the program that's running.
- NEXTPROG is the program that we want to run next. For example, several sub-menu might chain to a common program. NEXTPROG would be used to tell that target program which menu to return to.
- PRIORPG is the previous program after a chain. We rarely look at that variable but we try to set it.
Back to Standards Index
© 2001 mmcc All Rights Reserved.
Report problems or suggestions to support@mmcctech.com