home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP12.EXE / CHP1209.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  852 b   |  36 lines

  1. /*
  2.    Listing 12.9. A first attempt at converting in-line code to a
  3.                  general-purpose user-defined function.
  4.    Author: Craig Yellick
  5.    Excerpted from "Clipper 5: A Developer's Guide"
  6.    Copyright (c) 1991 M&T Books
  7.                       501 Galveston Drive
  8.                       Redwood City, CA 94063-4728
  9.                       (415) 366-3600
  10. */
  11.  
  12. function AskCust
  13. /*
  14.    General-purpose "which customer #" prompt:
  15.      r         row,
  16.      c         column,
  17.      message   prompt to display at r, c.
  18.  
  19.    Returns end-user's answer to the prompt.
  20. */
  21. parameters r, c, message
  22. local getlist := {}
  23. private answer := space(6)
  24.  
  25.   clear gets
  26.   setcolor("GR+/B")
  27.   setcursor(1)
  28.   @ r, c say message get answer picture "999999"
  29.   read
  30.   setcolor("W/N")
  31.   setcursor(0)
  32.  
  33. return answer
  34.  
  35. // end of file CHP1209.PRG
  36.