neilsf/XC-BASIC

EXIT DO in DO loop in FOR loop causes compilation error

Closed this issue · 3 comments

This program causes the error in line 9: Unclosed FOR block before LOOP

DIM j AS BYTE
DIM x AS BYTE

FOR j = 1 TO 2
	x = 3
	DO WHILE x > 1
		IF x < 2 THEN EXIT DO
		x = x - 1
	LOOP
NEXT j

It compiles fine for me. Are you using the latest compiler?

Wrong repo. I was reading the XC=BASIC 3 docs and clicked on Issues in the menu, and this is where I ended up.

I have now reported it at https://github.com/neilsf/xc-basic3/issues instead.

Yeah, wrong link on the website. Fixed that.