Re: Passing Global Variables Urgh.
- From: "John Thingstad" <john.thingstad@xxxxxxxxx>
- Date: Thu, 30 Aug 2007 12:53:55 +0200
På Thu, 30 Aug 2007 01:28:28 +0200, skrev landspeedrecord <landspeedrecord@xxxxxxxxx>:
I just don't get it. Urgh???
Others have explained dynamic variables.
Better to use a closure here
(let ((x "blargh"))
(defun test2 ()
(setf x "oorgoraah"))
(defun get-x () x))
(get-x)
--> "blargh"
(test2)
--> "oorgoraah"
(get-x)
--> "oorgoraah"
.
- References:
- Passing Global Variables Urgh.
- From: landspeedrecord
- Passing Global Variables Urgh.
- Prev by Date: Re: ANN: ABLE 0.4
- Next by Date: Re: Passing Global Variables Urgh.
- Previous by thread: Re: Passing Global Variables Urgh.
- Next by thread: Re: Passing Global Variables Urgh.
- Index(es):