home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP14.EXE / CHP1403.PRG < prev    next >
Encoding:
Text File  |  1991-06-12  |  895 b   |  29 lines

  1. /*
  2.    Listing 14.3 Displaying Menu with ACHOICE()
  3.    Author: Greg Lief
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. //───── NOTE: must compile with the /N option!
  12.  
  13. #include "box.ch"
  14.  
  15. function pick_a_day 
  16. local days := { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", ; 
  17.                 "Friday", "Saturday" }, sel := 0 
  18. local oldscrn := savescreen(8, 35, 16, 45)
  19. @ 8, 35, 16, 45 box B_SINGLE + " " color "+W/R"
  20. //───── do not allow user to Esc out, which would cause array access error
  21. do while sel == 0
  22.    sel := achoice(9, 36, 15, 44, days)
  23. enddo 
  24. //───── restore previous screen contents and color
  25. restscreen(8, 35, 16, 45, oldscrn) 
  26. return days[sel]
  27.  
  28. //───── end of file CHP1403.PRG
  29.