Hi everybody,
I have a double loop on an array in which each element is an array, like this:
for i=0 to 10
for j=0 to 5
print my_array[i][j]
end for
end for
The thing is that the size of the elements in the big array is changing. For example, my_array[0].Count() = 6 and my_array[1].Count() = 5.
So when i do my loop i have an error when i=1 and j=5 as my_array[1][5] doesn't exist. The problem is that if i stop my second loop at j=4 i will lose the last element of my_array[0], and i don't want to.
So is there a way to check if the element exists?
I tried :
for i=0 to 10
for j=0 to 5
if Eval(my_array[i][j]) = 252
print my_array[i][j]
end for
end for
and
for i=0 to 10
for j=0 to 5
if Eval(my_array[i][j]<>invalid) = 252
print my_array[i][j]
end for
end for
and
for i=0 to 10
for j=0 to 5
if my_array[i][j]<>invalid
print my_array[i][j]
end for
end for
but it doesn't work.
How can i do please?
Thank you.
Denis
PS: i use 252 with Eval() because in the codes in this post, it is said that it is the success return value.
viewtopic.php?f=34&t=47110&p=320415&hilit=eval#p320415