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

  1. /*
  2.    Listing 12.11. Eliminating the side-effects.
  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. local clr, crs
  25.  
  26.   clr := setcolor("GR+/B")
  27.   crs := setcursor(1)
  28.   @ r, c say message get answer picture "999999"
  29.   read
  30.   setcolor(clr)
  31.   setcursor(crs)
  32.  
  33. return answer
  34.  
  35. // end of file CHP1211.PRG
  36.