break also in for

This commit is contained in:
Irmen de Jong 2022-10-29 23:24:38 +02:00
parent 71d2f091e5
commit dc0edc4c2b
2 changed files with 2 additions and 11 deletions

View File

@ -715,7 +715,8 @@ And this is a loop over the values of the array ``fibonacci_numbers``::
uword number
for number in fibonacci_numbers {
; do something with number
; do something with number...
break ; break out of the loop early
}

View File

@ -1,17 +1,7 @@
%import textio
%import floats
%zeropage basicsafe
main {
float[10] flt
sub start() {
float ff = 9.0
flt[1] = 42.42
flt[1] = -9.0
flt[1] = -ff
flt[1] = -flt[1] ; TODO also fix crash when selecting vm target: fpReg1 out of bounds
floats.print_f(flt[1])
txt.nl()
}
}