Page 2 of 2
Re: Listing files in a directory
Posted: Thu Aug 04, 2011 11:00 am
by Danilo
ts-soft wrote:Here another one.
It just crashes when calling without the
optional argument:

Re: Listing files in a directory
Posted: Thu Aug 04, 2011 11:04 am
by ts-soft
This argument isn't optional, it looks only as

Re: Listing files in a directory
Posted: Thu Aug 04, 2011 4:23 pm
by TerryHough
@ts-soft
ts-soft wrote:Here another one.
Interesting. Frankly since the manual says Prototypes are for "advanced" programmers I never use them. Maybe I should try to learn more about them.
But I'm not sure there is any improvement in your approach.
When testing your code here (XP Pro) it averages 10 times longer than my posted routine which builds the tree display. Yours only counts the files while mine builds the tree, so it isn't an "apples to apples" comparison. I expected my code should take longer but it doesn't.
Yours is counting the subfolders multiple times and including them in the file count. The file count is overstated. I think your count increment is misplaced.
Re: Listing files in a directory
Posted: Thu Aug 04, 2011 5:01 pm
by ts-soft
Okay, the result is more to test some files added. CountList(Files()) gives the exactly result.
Have you made the speedtest without debugger? A routine, that fills any gadget can't faster as this routine
Prototypes not only for advanced programmers. This is required for everyone uses any DLL!
Callfunction... is for bad programmers
Greetings - Thomas