Liberty BASIC Community Forum
General >> General Board >> Continue http://libertybasic.conforums.com/index.cgi?board=general&action=display&num=1515618072 Continue
Post by Rod on Jan 10th, 2018, 3:01pm
There is a thread on the Yahoo forum which I have been trying to reply to for days. I give up. They seem to want to skip loop code if x =2 or 5 so what’s wrong with if x<>2 and x<>5?
Post by tsh73 on Jan 10th, 2018, 3:41pm
They seem to want to skip loop code if x =2 or 5 so what’s wrong with if x<>2 and x<>5?
It's not "wrong" They just used to have special operator - C-like CONTINUE. Me got taught about it, too so if I need it I just use GOTO Code:
for i = 1 to 100
... some code
if needsContinue then [continue]
... some more code
EDIT could actually lead to "wrong" indeed: stacking several conditions * either got one humongous super-condition - impossible to read and debug * or brings extra layers of indented code, which just pain to watch.
(EDIT2 actually, thats "code complete" slowly reappearing in my head. Likely that was said about nested IF's , like may be here, but I think it still apply. )
That is, you you really need that much conditions ;)