www.delorie.com/gnu/docs/guile/r5rs_31.html   search  
 
Buy GNU books!


Revised(5) Scheme

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.1.6 Assignments

syntax: set! <variable> <expression>

<Expression> is evaluated, and the resulting value is stored in the location to which <variable> is bound. <Variable> must be bound either in some region enclosing the `set!' expression or at top level. The result of the `set!' expression is unspecified.

 
(define x 2)
(+ x 1)                                ==>  3
(set! x 4)                             ==>  unspecified
(+ x 1)                                ==>  5


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003