home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 14.3 Displaying Menu with ACHOICE()
- Author: Greg Lief
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- #include "box.ch"
-
- function pick_a_day
- local days := { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", ;
- "Friday", "Saturday" }, sel := 0
- local oldscrn := savescreen(8, 35, 16, 45)
- @ 8, 35, 16, 45 box B_SINGLE + " " color "+W/R"
- //───── do not allow user to Esc out, which would cause array access error
- do while sel == 0
- sel := achoice(9, 36, 15, 44, days)
- enddo
- //───── restore previous screen contents and color
- restscreen(8, 35, 16, 45, oldscrn)
- return days[sel]
-
- //───── end of file CHP1403.PRG
-