[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-------------+############################################################
#+-| SAVE_MENU() |----------------------------------------+###################
#| +-------------+ Saves current MENU TO, @...PROMPT data |###################
#+--------------------------------------------------------+###################
##############################################################################
##############################################################################
#+--| Summary |------------+##################################################
#| #INCLUDE io.hdr |##################################################
#+-------------------------+##################################################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------------+############################
#| FUNCTION CHAR(14) save_menu PROTOTYPE |############################
#+-----------------------------------------------+############################
##############################################################################
##############################################################################
###########+---| Description |------------------------------------+###########
###########| This function saves the current MENU TO, @...PROMPT |###########
###########| data so another menu can be created without having |###########
###########| to recreate the current menu. |###########
###########| ---------------------------------------------------- |###########
###########| The function requires at least a 14 byte character |###########
###########| string. The character string may be larger, but not |###########
###########| smaller. |###########
###########| ---------------------------------------------------- |###########
###########| Use the restore_menu procedure to restore a saved |###########
###########| menu. |###########
###########+------------------------------------------------------+###########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Restore a menu prior to calling a subprocedure. |#########
#########| |#########
#########| VARDEF |#########
#########| CHAR(14) current_menu |#########
#########| ENDDEF |#########
#########| |#########
#########| {...} |#########
#########| |#########
#########| CASE menu_id = 1 |#########
#########| current_menu = save_menu() |#########
#########| DO subprocedure |#########
#########| restore_menu( current_menu ) |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Initialize three menus and then save each menu |#########
#########| * to an element in a character array. If you use |#########
#########| * this technique, you must use the SAVE clause with |#########
#########| * MENU TO. e.g., MENU TO x SAVE. |#########
#########| |#########
#########| VARDEF |#########
#########| CHAR(14) menus[ 3 ] |#########
#########| ENDDEF |#########
#########| |#########
#########| {...} |#########
#########| FOR r = 0 TO 2 |#########
#########| setup_menu( r ) |#########
#########| menus[ r ] = save_menu() |#########
#########| NEXT |#########
#########| |#########
#########| {...} |#########
#########| *--- select a menu by restoring the menu |#########
#########| |#########
#########| restore_menu( menus[ k ] ) |#########
#########| MENU TO menu_var SAVE |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
restore_menu
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson