                     dBASE III Function Keys
             (PC World September 1985 Star-Dot-Star)

     dBASE III has a SET FUNCTION command for defining the characters
sent by functions keys F2 through F10.  (Changing the value of F1 is
not allowed.)  You can use this facility to install menu selections
via functions keys as demonstrated by the program DKEYS.  The first
section of the program sets the values of function keys F2 through F7
to letters A through F, representing the six functions represented by
the menu.  The value of F8 is set to Z so that the program can recognize
the F8 key and indicate an error if it is pressed.  F9 and F10 are set
to QUIT and EXIT, respectively.  After setting the function key values,
the program displays the menu and waits for a keystroke.  A CASE
statement executes the selected function, then returns control to the
menu.

DKEYS:

SET FUNCTION 2 TO 'A'
SET FUNCTION 3 TO 'B'
SET FUNCTION 4 TO 'C'
SET FUNCTION 5 TO 'D'
SET FUNCTION 6 TO 'E'
SET FUNCTION 7 TO 'F'
SET FUNCTION 8 TO 'Z'
SET FUNCTION 9 TO 'Q'
SET FUNCTION 10 TO 'X'
SET TALK OFF
SET BELL OFF
STORE .t. TO cust_menu
CLEAR
DO WHILE cust_menu
  STORE ' ' TO func_sel
  @ 1,34 SAY "Customer Menu"
  @ 2,37 SAY DATE()
  @ 5,24 SAY 'F2    Open a New Customer Account'
  @ 7,24 SAY 'F3    Modify a Customer Account'
  @ 9,24 SAY 'F4    Display Customer Accounts'
  @ 11,24 SAY 'F5    Delete a Customer Account'
  @ 13,24 SAY 'F6    Print an Account Summary Report'
  @ 15,24 SAY 'F7    Print a Detailed Account Report'
  @ 17,24 SAY 'F9    Display Prior Menu'
  @ 19,24 SAY 'F10   Exit to DOS'
  @ 23,24 SAY 'Select Desired Option:'
  @ 23,48 SAY func_set
  @ 23,48 GET func_set
  READ
  DO CASE
    CASE func_sel = 'A'
      DO newacc
    CASE func_sel = 'B'
      DO modacc
    CASE func_sel = 'C'
      DO dspacc
    CASE func_sel = 'D'
      DO delacc
    CASE func_sel = 'E'
      DO accsum
    CASE func_sel = 'F'
      DO accdet
    CASE func_sel = 'X'
      STORE .f. to cust_menu
      LOOP
    CASE func_sel = 'Q'
      QUIT
      ELSE
      @ 0,0 SAY CHR$(7)
    ENDCASE
    CLEAR
ENDDO cust_menu
