BREAK/CONTINUE does not work inside REPEAT/UNTIL

Previous topic - Next topic

ampos

The compiler gives an error

error : BREAK outside of FOR/WHILE

if the BREAK/CONTINUE is inside a REPEAT/UNTIL loop
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Moru

The manual says break is only used in FOR and WHILE loops. So not a bug but mabe a feature request? :-)

ampos

check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Scott_AW

Isn't repeat fairly new?

I remember when I went to 8 I had to rename a goto.

On the plus side I was happy to see a UNTIL loop.
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

MrTAToad

Yes, REPEAT/UNTIL is fairly new.

Technically, using BREAK inside a REPEAT/UNTIL loop is poor form really (using it in WHILE could also be regarded as the same), as you should be using the condition to break out of the loop.

Scott_AW

Have you tried using CONTINUE and triggering the UNTIL?

What do you have going on in the loop?
Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/