View Single Post
SpawnerF
Member
Join Date: Apr 2017
Location: Morocco
Old 07-06-2017 , 11:46   Re: [ TUT ]Dynamic Array
Reply With Quote #41

Hi,

Code:
"An array follows the same rules as a regular variable"
How?

A regular variable when it's created it creates a new place in memory when we add/remove a value on it it creates also a new place in memory so you mean that Array:_ArrayName does the same?

Code:
"* These are not designed to be used as a replacement for normal arrays, as
* normal arrays are faster and should be used whenever possible."
Of course, since we can add more than the specified size in a static array . So i don't see how it's smart ...

Also is there a way to add a key and pair to the Array something like that?


Code:
ArrayPush( _ArrayName, key, pair );

Also if it would be good if a duplicate check ( boolean ) added in pushString and others, if it's true then you can add Duplicated items but if it's false skip them.

why cellsize is equal to 1? Since the Array that we have created is Empty at the begining shouldn't be Size equal to 0?

Code:
ArrayCreate( cellsize=1 );

And thank's for your effort.
__________________
XX was created just for giving evidence and not meant to damage public servers.
&We do not test on public servers.
Thank's.
SpawnerF is offline