home *** CD-ROM | disk | FTP | other *** search
- ' ********** READ ME ***********
- ' Specifically, it fills the passed FIL$ array with filenames matching
- ' the passed mask$. This is provided to you as a way to provide upward
- ' GLIB compatibility: A QB3 program that called DIR can VERY easily call
- ' the separate routines used in the QB4 version.
- '
- ' Written for TAB setting of 5, this is essentially the 'GUTS' to the
- ' DIR SUB...END SUB in the main module
-
- DEFINT A-Z ' gotta use ints espcially for FILCNT
- STATIC j, tfil$
-
- CALL filcnt(mask$, quan) ' calling again here, prevents us from
- ' having to pass QUAN as a parm
-
- tfil$ = SPACE$(12) ' Save space
- CALL firstf(mask$, tfil$) ' Get first matching file
-
- fil$(1) = RTRIM$(tfil$) ' move that many chars to array
-
- FOR x = 2 TO quan
- tfil$ = SPACE$(12) ' prevent bleed thru from longer filename
- CALL nextf(tfil$) ' Find Next Matching File
- fil$(x) = RTRIM$(tfil$) ' store in array
- NEXT x
-