HPlogo Command Interpreter Access and Variables Programmer's Guide: Series HP 3000 Computer Systems > Chapter 7 Sample Command Files

To Create a Menu of Options

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The MENU command file provides a mechanism for running two programs, DBREVIEW and DBUPDATE. The user's response of 1 or 2 performs the proper program and prompts the user for another selection. A response of 0 to exit the routine ends the WHILE loop and ends the command file execution.

Figure 7-10 Menu Command File

SETVAR CHOICE ""

WHILE CHOICE <> "0" DO

  ECHO Enter 0 to exit

  ECHO       1 to review database

  ECHO       2 to update database

  INPUT CHOICE,"Which number do you select?",15

  IF CHOICE = "1" THEN

    DBREVIEW

  ELSEIF CHOICE = "2" THEN

      DBUPDATE

  ENDIF

ENDWHILE
Feedback to webmaster