VB.Net - FOR loop, using a variable iteration?
Wanna do something like this for example:
if xyz > 0 then
y = 1
else
y = -1
end if
for x = 0 to xyz +y
So in other words I want to be able to specify the iteration. I remember being able to do something similar, probably with c or c++. Can this be done in vb.net 08? If so please show syntax, as I have tried everything obvious and I am using express without MSDN. No luck with google as all the search terms are commonly used..
TIA
A for loop requires a block and there should be some statement inside of it.
You can't just put "for x = 0 to xyz +y" and expect it to do anything.
for x = 0 to (xyz+y) ' Do something herenext x
You can't just put "for x = 0 to xyz +y" and expect it to do anything.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement