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

  1. /*
  2.    Listing 9.2. An afill() for arrays with multiple dimensions.
  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. function M_afill(a_, value)
  12. /*
  13.    Multi-dimension afill()
  14. */
  15. local i
  16.   for i := 1 to len(a_)
  17.     if valtype(a_[i]) = "A"
  18.       M_afill(a_[i], value)
  19.     else
  20.       a_[i] := value
  21.     endif
  22.   next i
  23. return nil
  24.  
  25. // end of file CHP0902.PRG
  26.