Assignments
List of: Discussion Topic
Subjects: Scheme AIDE Application, Scheme Interface
Contents: Scheme Support

A primitive assignment expression has the following form:

(set! <variable> <expression>) - <expression>

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

(define test 1)
(set! test 2)
;; 1

Example 1-5.
PDF/SCM/01CMP.PDF
HTM/DATA/SCM/SCM/01CMP/0020.HTM