Size of freed arrays

Everything else that doesn't fall into one of the other PB categories.
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Size of freed arrays

Post by tinman »

If I free an array and then use ArraySize() I get a result of -1. Is this something that can be relied on going forward?
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
User avatar
einander
Enthusiast
Enthusiast
Posts: 744
Joined: Thu Jun 26, 2003 2:09 am
Location: Spain (Galicia)

Re: Size of freed arrays

Post by einander »

Post by Fred » Mon Oct 19, 2009 20:19
I modified ArraySize(), so it will return -1 if the array isn't declared.
http://www.purebasic.fr/english/viewtop ... ze#p303466
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Re: Size of freed arrays

Post by tinman »

Hi einander,

Excellent, thank you.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
User avatar
einander
Enthusiast
Enthusiast
Posts: 744
Joined: Thu Jun 26, 2003 2:09 am
Location: Spain (Galicia)

Re: Size of freed arrays

Post by einander »

You're welcome.
Post Reply