Code: Select all
for value in []
('do something')
else
Msgbox "empty array"
Code: Select all
for value in []
('do something')
else
Msgbox "empty array"
the for-else is NOT treating the empty array as false
The condition for an Else statement executing depends on the associated statement:
For, Loop (any kind), While: The loop had zero iterations.