mirror of
https://github.com/irmen/prog8.git
synced 2025-02-24 13:29:10 +00:00
break also in for
This commit is contained in:
parent
71d2f091e5
commit
dc0edc4c2b
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user