Page 1 of 1

Checking how an array was Dimmed....

Posted: Sat Aug 09, 2008 11:59 am
by Arcee_uk
If I Dim an array to say 34 elements how I can get my program to check what that array was dimmed to, I.e the maximum elements available?

E.g I use the command:

Code: Select all

Dim Arrary.l(45)
My program needs to redim this array by 6 to make it larger, but doesn't know how big the array was. So it needs to check and see, then add 6 to the answer and ReDim it ready for use.

I know I could store the figure the array was dimmed to, but I just wondered if there is a command that will find out for me which I could use locally within a procedure rather than globalising another variable to hold the number.

I cannot see a command in the user guide that does this (unless I am blind which is possible) and nor can I see an answer on here when I searched for it.

If anyone can tell me how you do it (or point me to a post I missed) I would be very greatfull.

Thanks all.

Arcee.

Posted: Sat Aug 09, 2008 12:03 pm
by Kaeru Gaman

Posted: Sat Aug 09, 2008 6:54 pm
by Mistrel