On this page:
block
var
empty-statement
if
for
while
break
continue
with
label
throw
try
7.7

5 Statements

syntax

(block stmt ...)

Evaluates each stmt in order, returning the value of the last statement.

syntax

(var [id expr] ...)

Updates the value of the variable bound to id with the result of evaluating expr.

syntax

(empty-statement)

Does nothing.

syntax

(if test true)

(if test true false)
Evaluates test, then executes true if the result of applying to-boolean to the resulting value is #t. Otherwise, false is executed if supplied.

syntax

(for maybe-init maybe-test maybe-update body ...)

 
maybe-init = 
  | #:init init
     
maybe-test = 
  | #:test test
     
maybe-update = 
  | #:update update

syntax

(while test body ...)

Repeatedly executes body so long as the result of (to-boolean test) is #t beforehand.

Equivalent to

(for #:test test body ...)

syntax

(break)

(break label)
Aborts the enclosing loop, or the loop with label label. This form is illegal outside of a for or while loop.

syntax

(continue)

(continue label)
Jumps to the next iteration of the enclosing loop, or the loop with label label. This form is illegal outside of a for or while loop.

syntax

(with expr form ...)

syntax

(label id stmt)

syntax

(throw expr)

syntax

(try form ... maybe-catch maybe-finally)

 
maybe-catch = 
  | #:catch catch-id catch-form ...
     
maybe-finally = 
  | #:finally finally-form ...