Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / is data of risized array will remain complete?

Author
Message
krid
11
Years of Service
User Offline
Joined: 2nd Dec 2014
Location: Almaty / Kazakhstan
Posted: 6th Feb 2015 21:44
Is data of risized array will remain complete(not lost due to resize function) ?
So I dont need to backup this data into temp array?



I checked simple array ( myArray as integer[2]) and custom typed (myArray of customType[2]).

It seems everything fine, but I need to know for sure.
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Feb 2015 11:53
Making the array larger will retain all of your array elements.

Making an array smaller will lose the last elements.

Quidquid latine dictum sit, altum sonatur
paulrobson
11
Years of Service
User Offline
Joined: 22nd Nov 2014
Location: Norfolk, England
Posted: 7th Feb 2015 12:02
And if you regrow it again, the new elements will be zero, not the values of the old ones. So it works as it should
krid
11
Years of Service
User Offline
Joined: 2nd Dec 2014
Location: Almaty / Kazakhstan
Posted: 7th Feb 2015 13:01
Thank you.

Login to post a reply

Server time is: 2026-06-05 14:02:45
Your offset time is: 2026-06-05 14:02:45