I need the equivalent of the 'C' "continue" function so that my code will perform the next iteration of a loop. The only clean way I can think of doing this is to use a "goto" with a label just before the "End While".
Sadly, this doesn't appear possible.
Looking at a tiny snippet of my code
while Next_Command() <> Null
if (instr(Strng, "COMMENT") <> 0) then
FieldPtr = StartAt
goto label1
end if
.
.
.
.
etc.
label1:
end while
When I try to build this, I get the error:
parser error: Label1 already declared (label) at some place in line 194 near pos 1
If the label is outside the loop:
.
.
end while
label1:
there is no error BUT, this rather defeats what I'm trying to do.
So, there is either a bug in KBasic, or this is an invalid structure. As this is allowed in VBasic I suspect that this is a bug in KBasic.
Whatever it is, does anyone have a suggested alternative approach to the lack of "continue"? The trouble is that this is a very big function and if I try to use conditionals it will become VERY difficult to follow the code!