Liberty BASIC Community Forum
« Continue »

Welcome Guest. Please Login or Register.
Jan 23rd, 2018, 7:47pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Continue  (Read 87 times)
Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5618
xx Continue
« Thread started 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?
User IP Logged

tsh73
Board Moderator

member is offline

Avatar

Anatoly (real name)


PM

Gender: Male
Posts: 1732
xx Re: Continue
« Reply #1 on: Jan 10th, 2018, 3:41pm »

Quote:
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
[continue]
next
 


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 ;)

EDIT3
nice one
User Image
« Last Edit: Jan 10th, 2018, 3:57pm by tsh73 » User IP Logged

damned Dog in the Manger
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls