mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-01 04:20:39 +02:00
[forth/en] Fix expected result for one-to-12 loop (#4049)
This commit is contained in:
@@ -106,7 +106,7 @@ myloop
|
||||
|
||||
\ We can get the value of the index as we loop with `i`:
|
||||
: one-to-12 ( -- ) 12 0 do i . loop ; \ ok
|
||||
one-to-12 \ 0 1 2 3 4 5 6 7 8 9 10 11 12 ok
|
||||
one-to-12 \ 0 1 2 3 4 5 6 7 8 9 10 11 ok
|
||||
|
||||
\ `?do` works similarly, except it will skip the loop if the end and start
|
||||
\ numbers are equal.
|
||||
|
Reference in New Issue
Block a user