...optional IDs for AllocateMemory(), etc.

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Froggerprogger
Enthusiast
Enthusiast
Posts: 423
Joined: Fri Apr 25, 2003 5:22 pm
Contact:

...optional IDs for AllocateMemory(), etc.

Post by Froggerprogger »

I think I already have read this wish to make the ID for AllocateMemory(), OpenWindow(), etc. optional to work only with the pointer, but I didn't find a topic for it.
This would REALLY be useful especially for shared procedures. So procedures here in the forum or in your own program could easily copied&pasted and would just work, especially when you want to allocate lots of different memoryblocks inside them.
It's very unconvenient to handle the IDs when not needed.
At the moment I use GlobalAlloc_() but that is Windows only.

If this is not possible to implement, perhaps a function such as NextFreeMemoryID(), NextFreeOpenWindowID(), NextFreeFileID(), etc. was.
It should return the next available not-already-used ID.
Of course this might cause the conflict that then the program tries to use this ID explizit somewhere in the following, but it's not as bad as before.

Is this planned for a future version ? Pleeeeaaassee ?

EDIT:
Perhaps use a constant named #PB_UNHANDLED with value -1 for these functions ?
%1>>1+1*1/1-1!1|1&1<<$1=1
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Post by Danilo »

Please stop it now!

The new system is already working but needs some more testing...
...so you dont get it today.

People are requesting this *every day*, its annoying - its enough!

As Fred said many many times, it will come... please be patience.
cya,
...Danilo
...:-=< http://codedan.net/work >=-:...
-= FaceBook.com/DaniloKrahn =-
Froggerprogger
Enthusiast
Enthusiast
Posts: 423
Joined: Fri Apr 25, 2003 5:22 pm
Contact:

Post by Froggerprogger »

That's a clear statement ! THANK YOU !!
:twisted:
%1>>1+1*1/1-1!1|1&1<<$1=1
Post Reply