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

  1. /*
  2.    Listing 12.10. An improved AskCust() function with correct scope.
  3.    (see also ASKCUST.CH)
  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.  
  13. function AskCust(r, c, message)
  14. /*
  15.    General-purpose "which customer #" prompt:
  16.      r         row,
  17.      c         column,
  18.      message   prompt to display at r, c.
  19.  
  20.    Returns end-user's answer to the prompt.
  21. */
  22. local answer := space(6)
  23. local getlist := {}
  24.  
  25.   setcolor("GR+/B")
  26.   setcursor(1)
  27.   @ r, c say message get answer picture "999999"
  28.   read
  29.   setcolor("W/N")
  30.   setcursor(0)
  31.  
  32. return answer
  33.  
  34. // end of file CHP1210.PRG
  35.