DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(r5rs.info.gz) Conditionals

Info Catalog (r5rs.info.gz) Procedures (r5rs.info.gz) Primitive expression types (r5rs.info.gz) Assignments
 
 4.1.5 Conditionals
 ------------------
 
  -- syntax: if <test> <consequent> <alternate>
  -- syntax: if <test> <consequent>
      _Syntax:_ <Test>, <consequent>, and <alternate> may be arbitrary
      expressions.
 
      _Semantics:_ An `if' expression is evaluated as follows: first,
      <test> is evaluated.  If it yields a true value (see section 
      Booleans), then <consequent> is evaluated and its value(s)
      is(are) returned.  Otherwise <alternate> is evaluated and its
      value(s) is(are) returned.  If <test> yields a false value and no
      <alternate> is specified, then the result of the expression is
      unspecified.
 
      (if (> 3 2) 'yes 'no)                  ==>  yes
      (if (> 2 3) 'yes 'no)                  ==>  no
      (if (> 3 2)
          (- 3 2)
          (+ 3 2))                           ==>  1
 
 
Info Catalog (r5rs.info.gz) Procedures (r5rs.info.gz) Primitive expression types (r5rs.info.gz) Assignments
automatically generated byinfo2html