opendir() - It returns list of files or the file count - Whichis it?

Bruce Easton bruce at stn.com
Tue Sep 4 15:49:19 PDT 2007


Kenneth Brody wrote Monday, September 03, 2007 12:27 AM:
>
> Quoting fp at casabellagallery.com (Sun, 02 Sep 2007 20:38:02 -0700):
> [...]
> > Reading the F9 help no much information is given.  I went to online
> > help and just about the same.  The online help, however, gives me
> > mixed signals.
> >
> >[..]
>
> I see no "mixed signals" here.  The first instance doesn't say it returns
> the list, but rather "creates a list".  It returns the number of files in
> that list.
>
> [...]
> > That said, how do I get opendir() to give me the "list of files" and not
> > "the number of files"?
>
> opendir() doesn't give you the list.  It creates the list and returns
> the size of that list.
>
> To get the list itself, either iterate through using nextdir(), or use
> the @DIRLIST_*[] system arrays.
>
> --
> KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>

Ken - the online manual at fptech seems OK regarding these commands
(although it certainly wouldn't hurt to have a mention about nextdir()
somewhere in the description of opendir() so that someone can see how
these are used together).  Fortunately, related commands and release
notes are visible in the left pane when viewing each command.

My 5.0 dcabe.hlp file is a completely different animal on these commands.
I was very confused the first time I read the help file. Under four of the
examples of syntax, the expression "Return - List of ..." begins each
sentence.  And the top description of the command states "Returns the
number of files or list of files."  The example given for the nextdir()
command includes the assignment and comment:

then: fn(25) = NEXTDIR()  'return directories or filename & ext.

How can it return a filename & ext. from the first 25 bytes of nextdir()
if, above the example, the return value is described as having a [fixed]
format where the first 32 bytes are the filename and then a space and
then 10-byte extension, etc?

I wonder if the help on these is different in 5.6.  Maybe Jose meant
to say that the "F9" help gave him mixed signals?

Bruce

Bruce Easton
STN, Inc.






More information about the Filepro-list mailing list