home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 12.12. Making the function more flexible.
- NOTE: calls SaveEnv() and RestEnv() as found in CHP1207.PRG
- (see also ASKCUST.CH)
- Author: Craig Yellick
- 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
- */
-
- function AskCust(r, c, message, msgColor, defAnswer, pict)
- /*
- General-purpose "which customer #" prompt:
- r row,
- c column,
- message prompt to display at r, c,
- msgColor color to use for message,
- defAnswer default answer to prompt,
- pict picture to use with GET.
-
- Returns end-user's answer to the prompt.
- */
- local answer := defAnswer
- local getlist := {}
-
- SaveEnv("GR+/B", 1)
- @ r, c say message get answer picture (pict)
- read
- RestEnv()
-
- return answer
-
- // end of file CHP1212.PRG
-