how would i get the number of indexes in an array?
for example
Simba Code:for i := 0 to ArrayCount do
how would i get the number of indexes in an array?
for example
Simba Code:for i := 0 to ArrayCount do
Simba Code:Integer := High(ArrayName);
? At least I think thats what you are after
Simba Code:for i := 0 to High(ArrayName) do
ArrayName[i] := i;
Last edited by DannyRS; 03-14-2013 at 08:41 PM.
Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

You could also use Length() ie.
Code:for i := 0 to length(ArrayName)-1 do ArrayName[i] := i
Last edited by wthomas; 03-14-2013 at 09:02 PM. Reason: Fixed code
Yes perfect!! thank you both!

There are currently 1 users browsing this thread. (0 members and 1 guests)