LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

CONTINUE outside a loop gives a syntax error

Root / Programming Questions / [.]

12Me21Created:
CONTINUE doesn't have syntax...

CONTINUE outside of a loop should give an error.

CONTINUE outside of a loop should give an error.
Yes, but it shouldn't be a syntax error.

Yes, but it shouldn't be a syntax error.
Why not? Syntactically, it is an error: it is a syntax error.

Yes, but it shouldn't be a syntax error.
Why not? Syntactically, it is an error: it is a syntax error.
CONTINUE has no syntax It just exists Just like how NEXT without FOR isn't a syntax error.

From Wikipedia: "syntax . . defines the combinations of symbols that are considered to be a correctly structured document or fragment in that language" Syntax is the overall grammar, not just any one instruction. If not being able to CONTINUE outside of a loop is part of the grammar rules, it's a syntactical error.

From Wikipedia: "syntax . . defines the combinations of symbols that are considered to be a correctly structured document or fragment in that language" Syntax is the overall grammar If not being able to CONTINUE outside of a loop is part of the grammar rules, it's a syntactical error.
No... what is wrong with the syntax of:
CONTINUE
? ...nothing It is a "invalid CONTINUE" or "CONTINUE outside of loop" error

CONTINUE has rules about how and where it can be placed in a program: it has syntax. NEXT without FOR is also a syntax error (in SmileBasic).

it's a syntax error though, SB throws FOR without NEXT and other similar errors when a syntax error would be enough. maybe they should put in a CONTINUE outside loop error to be consistent