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

  1. /*
  2.    Listing 9.15. Load an array with database structure information
  3.                  based on the DOS directory.
  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. #include "Directry.ch"
  13.  
  14. function DOS_Load
  15. /*
  16.    Load array containing database and field information
  17.    directly from the contents of the DOS files, rather
  18.    than using a source code routine.
  19. */
  20.  
  21. local i, name_, dbf_ := {}
  22.   name_ := directory("*.DBF")
  23.   for i := 1 to len(name_)
  24.     use (name_[i, F_NAME]) new
  25.     aadd(dbf_, {name_[i, F_NAME], "", dbstruct(), {}})
  26.     use
  27.   next i
  28. return dbf_
  29.  
  30. // end of file CHP0915.PRG
  31.