Page 1 of 1

Rename FinishDirectory() to FreeDirectory()

Posted: Wed Nov 15, 2006 7:38 pm
by Tranquil
Hi PB Team.

All commands uses FreeXXXXX Commands to free any PB allocated resources. Only ExamineDirectory uses FinishDirectory().

To be common with all other commands it maybe better to rename this to FreeDirectory() too?

Cheers
Mike

Posted: Wed Nov 15, 2006 7:55 pm
by AND51
Why not use macros until Fred agrees you?

Code: Select all

Macro FreeDirectory(dir)
     FinishDirectory(dir)
Macro
Advantage: No performance-loss, because you use a macro insted of a procedure.


Hast du alles verstanden? :wink:

Posted: Wed Nov 15, 2006 10:45 pm
by Trond
All Examine*() functions are closed with Finish*()

Posted: Wed Nov 15, 2006 11:52 pm
by ts-soft
Trond wrote:All Examine*() functions are closed with Finish*()
No, only directory!
CloseDirectory or FreeDirectory is more logical in my head :wink:

Posted: Thu Nov 16, 2006 6:03 am
by Tranquil
ts-soft wrote:
Trond wrote:All Examine*() functions are closed with Finish*()
No, only directory!
CloseDirectory or FreeDirectory is more logical in my head :wink:
You are right, it sounds more logicaly.
This was the first time I used the FileSystem Lib of PB. And while coding I wanted to release the #PB_Any allocated Ressources and wondered that FreeDirectory() does not exist.

But anyway, I can also live with FinishDirectory(). :D

Posted: Thu Nov 16, 2006 8:59 am
by AND51
You sound, as if you didn't pay attention to my post... :cry:

Posted: Thu Nov 16, 2006 9:24 am
by Tranquil
AND51 wrote:You sound, as if you didn't pay attention to my post... :cry:
I noticed your message, sorry for not replaying to it.
The reason of my posting was only something logical I encountered while coding. Your Macro is surely a workarround for me, but its not really neccessary.

Anyway, thanks for your idea.

Und klaro hab ich Dich verstanden. :D

Posted: Thu Nov 16, 2006 9:32 am
by AND51
lol, dann ist ja alles im Lot. :D


All in all, I also agree to Tranquils idea renaming FinishDirectory() to FreeDirectory().