[22 Apr 2008] Question obout DOS Library
Posted: Sat Jun 13, 2020 5:31 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 22 Apr 2008 09:47:11 -0000
Hello, I was wondering if there is a method to open files in a dynamic way like in LUA? In Hollywood I have to assign an <id> for every file I want to open, but if I have several open/close operation in random order I have to track on my own which id's are free and which are in use; in LUA this is not necessary because opening a file returns an handler that can be freed later. Now it can be very usefull if OpenFile without <id> argument (passing <nil> as <id>) could allocate an id for you returning it as result of the function, freeing the programmer from building functions to track down <id> with a table resulting in a much more simple and fast code. I hope you have understood my "weird" english, sorry about that [:)]
Regards, Fabio.
Hello, I was wondering if there is a method to open files in a dynamic way like in LUA? In Hollywood I have to assign an <id> for every file I want to open, but if I have several open/close operation in random order I have to track on my own which id's are free and which are in use; in LUA this is not necessary because opening a file returns an handler that can be freed later. Now it can be very usefull if OpenFile without <id> argument (passing <nil> as <id>) could allocate an id for you returning it as result of the function, freeing the programmer from building functions to track down <id> with a table resulting in a much more simple and fast code. I hope you have understood my "weird" english, sorry about that [:)]
Regards, Fabio.