previous up next     contents index
Next: WhenUnless, and Begin0 Up: Conditionals Previous: Conditionals

Cond and Case

In MzScheme's normal modegif, the result of a cond expression with no matching clause is #<void>. In other modes, evaulating a non-matching cond raises the  exn:cond exception.

A  case expression clause can have the form

 
  (datum expr  tex2html_wrap_inline8724 ) 
as in the 0 clause in this example:
 
   (case x
     ((1 3 5) 'small-odd)
     ((2 4 6) 'small-even)
     (0 'zero)
     (else 'big)) 
All case expressions are expanded into a cond expression; depending on the MzScheme's running mode, evaluating a case expression with no matching clause will raise the  exn:cond exception.



PLT