Global variables and declarative modules

Tommi Höynälänmaa <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <[email protected]>
Suppose we have module a that defines a global variable:

---

(define-module (a))

(export my-global-var)

(define my-global-var #f)

---

and module b that uses the global variable and changes it:

---

(define-module (b))

(use-modules (a))

(define (my-proc)

     (set! my-global-var 100)

     (display my-global-variable))

---

Is it so that module a can't be marked declarative?

      - Tommi Höynälänmaa

-- 
Kotisivu / Homepage: http://www.iki.fi/tohoyn/
Sähköposti / E-Mail: [email protected]
GPG-sormenjälki / GPG fingerprint:
55F4 2477 7155 3528 5CB2 2B7A BB86 1FDE 4046 0F83
FT, Debian-ylläpitäjä / PhD, Debian Maintainer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.