|
Never Newbie
Joined: 22 Dec 2001 Posts: 4
|
Posted: Wed Jul 31, 2002 12:50 am
Array Sizes |
Is there a way to shrink an array? Say you want a list of members in your group. I was keeping names as an array, when they leave, I want to remove their names and shrink the array by 1, hmm, I suppose I could just have an arbitrary array size and then just change the values as needed...Any thoughts?
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Jul 31, 2002 1:51 am |
Try using a list instead of an array. The related commands are ADDITEM, DELITEM, and DELNITEM. The related functions are ismember, item, numitems, additem, delitem, replaceitem, dups, and sort. I am sure you will see they are a bit more flexible while providing all the same functionality.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jul 31, 2002 2:58 pm |
There is no way to shrink an array, or to remove items from it, other than redoing the entire array. Lists are much easier.
LightBulb
Senior Member |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|