scm-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scm-discuss] nested define question


From: Aubrey Jaffer
Subject: Re: [Scm-discuss] nested define question
Date: Fri, 28 Sep 2012 00:02:31 -0400 (EDT)

 | Date: Tue, 25 Sep 2012 23:16:02 -0300
 | From: Tom Kwong <address@hidden>
 | 
 | Hi,
 | 
 | Can someone please explain why the following nested define
 | structure does not work?
 | Thanks in advanced.
 | 
 | SCM version 5e7, Copyright (C) 1990-2006 Free Software Foundation.
 | 
 | > (define (abc)
 |   (define (a) 1)
 |   (define b (a))
 |   (print b))
 | (abc)
 | #<unspecified>
 | >
 | ;ERROR: unbound variable:  a
 | ; in expression: (a)
 | ; in scope:
 | ;   (b a . address@hidden)
 | ;   ()

If you reverse the order of the internal defines it will work.  I have
changed this in the development version so it works with (a) defined
before b:

http://groups.csail.mit.edu/mac/ftpdir/users/jaffer/scm.zip

Also, the CVS repository is updated:
https://savannah.gnu.org/cvs/?group=scm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]