Clear all values in an array

Apr 3, 2018 at 9:23pm
Does clearing all values in an array meaning reducing the amount of elements in the array to 0, or initializing all the current elements to 0?
Last edited on Apr 3, 2018 at 10:25pm
Apr 4, 2018 at 12:44am
Hello Shezshade,

Usually clearing an array means to set each element to zero. If you tried to reduce the size of the array or remove elements it would create bigger problems afterwords.

Depending on what type of array you have it may take a for loop to set each element to zero,

Hope that helps,

Andy
Apr 4, 2018 at 2:09am
Thank you.
Topic archived. No new replies allowed.