Dynamic int Array
Displaying 1-6 of 6 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
gannon

This will allow you to have an int array that grows and shrinks. It will also grow automatically if you try to set something above what is allocated for it.
This also allows for temp int arrays.
This uses DMA but many failsafe have been put in so that should not be a problem.

questions? bugs? comments?
if you want more features just ask!

ERROR, TELL GRUE THAT THE PARENT_ID WAS NOT SENT!

Posted on 2004-08-29 02:57:04

Gayo

Grue, the parent_id wasn't sent.

Posted on 2004-08-29 04:11:38

mcgrue

kay, thanks :/

Posted on 2004-08-29 04:23:03

basil

Awesome. I can most certainly use this. Cheers.

Posted on 2004-08-29 05:01:09

rpgking

Cool, I think I know something that this will be useful for.

Posted on 2004-08-29 05:58:15

gannon

couple things. (I need to put in readmes.)
resize doesn't change the length.(unless it shrinks then the newlength is the newsize)
length is max(size of array created, largest index set)
I seperated size and length to prevent constant resizing while walking up the array.

Change the code as you see fit.
Change DA_numberOfArrays to change how many arrays you can have at once.
Change DA_autoBufferGrowth if you find the auto grow happens too often.

Posted on 2004-08-29 07:54:20


Displaying 1-6 of 6 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.