8.18
top
← prev up next →

While loops for RacketπŸ”— i

This basically provides while , break and continue .

1Example and usageπŸ”— i

(require dyoo-while-loop)
 
"quit"))
(printf "quit?"))
 
(while #t
(define input(read-line ))
(unless (regexp-match #px"please"input)
(printf "Youdidn'tsayplease\n")
(when (regexp-match #px"quit"input)
(break )))

syntax

( while testbody...)

Repeat the evaluation of the body so long as test is true.

syntax

( break )

Break out of the innermost loop.

syntax

( continue )

Restart the innermost loop.

top
← prev up next →

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /