<Var/Array> = The array to be resized.
<Var/Number> = The size you wish the array to be when this command is completed.
Resizes the target array so that it has exactly <Var/Number> elements.
This instruction can either make an array smaller or larger.
Using this command will add/remove elements from the end of the array.
If the selected array is being made smaller, any values stored at these elements being removed will be lost.
Example:
$array.size size of array $this.array
$new.size = $array.size + 5
resize array $this.array to $new.size
The above example would get the current size of the array so the number of required elements could be added to this number. This would then give you the new array size required to accommodate the number of new elements required.
Command Location:
- »» General Commands
- »» Arrays
resize array <Var/Array> to <Var/Number>
- »» Arrays