home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 9.15. Load an array with database structure information
- based on the DOS directory.
- Author: Craig Yellick
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- #include "Directry.ch"
-
- function DOS_Load
- /*
- Load array containing database and field information
- directly from the contents of the DOS files, rather
- than using a source code routine.
- */
-
- local i, name_, dbf_ := {}
- name_ := directory("*.DBF")
- for i := 1 to len(name_)
- use (name_[i, F_NAME]) new
- aadd(dbf_, {name_[i, F_NAME], "", dbstruct(), {}})
- use
- next i
- return dbf_
-
- // end of file CHP0915.PRG
-