home *** CD-ROM | disk | FTP | other *** search
- /*
- create and check an index file for a database
- */
- db = new(Dbffile,"patient");
- top(db);
- index = createIndex(db,"patient","lname",0,0);
- ? "type of index is ",type(index);
- close(db);
-
- /*
- open the index and print out records in index order
- */
- db = new(Dbffile,"patient");
- new(Ndxfile,db,"patient");
- top(db);
- while(!eof(db)) {
- ? recno(db)," ",lname;
- skip(db,1L);
- }
- close(db);
-