home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP09.EXE / CHP0904.PRG < prev    next >
Encoding:
Text File  |  1991-06-01  |  655 b   |  27 lines

  1. /*
  2.    Listing 9.4. A function that returns an array.
  3.    Author: Craig Yellick
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11.  
  12. function Gimme(what, where, when)
  13. /*
  14.    Returns array filled with the "what" field,
  15.    for all records where the "where" condition is true
  16.    when compared to the value specified by "when".
  17. */
  18. local these_ := {}
  19.   seek when
  20.   do while &where. = when
  21.     aadd(these_, &what.)
  22.     skip
  23.   enddo
  24. return these_
  25.  
  26. // end of file CHP0904.PRG
  27.