Forum Discussion
EnTerr
12 years agoRoku Guru
"RokuMarkn" wrote:"EnTerr" wrote:Yes:
Continue typically it is replaced with a single if not ... end if. Off hand i cannot think of example where "a ton of nested if/elseif/endif blocks" will be needed for that, can you?
[cut]
That's the main purpose of continue, to avoid this style of coding where you've got to tilt your head 45 degrees to read the code.
Good illustration, thanks - was distracted by the /elseif/ part. I like the "45deg reading" expression. There might be better way to do the example semantically (can't work with "number(1)" etc) - but the goto exit strategy is obviously:
while something
if first then goto continue
number(1)
if second then goto continue
number(2)
if third then goto continue
number(3)
' etc
continue:
end while