Article View: fj.lang.lisp
Article #473Re: closure and special variable
From: Yasuaki Honda
Date: Fri, 26 Jun 1992 05:51
Date: Fri, 26 Jun 1992 05:51
43 lines
2926 bytes
2926 bytes
$@K\ED!w%=%K!<%3%s%T%e!<(J$@%?%5%$%(%s%98&5f=j$G$9!#(J
In article <HMATSUDA.92Jun26081718@rc.cc.titech.ac.jp> hmatsuda@cc.titech.ac.jp (Hiroyuki Matsuda) writes:
$@2P$r$D$1$?@UG$$,$"$k0J>e(J, CMU Lisp$@$N%I%-%e%a%s%H$r8+D>$7$F$_$^$7$?(J.
$@$=$&$9$k$H(J, $@<!$N$h$&$JJQ?t$,$"$k$3$H$,$o$+$j$^$7$?(J.
(defvar *top-level-auto-declare* :warn
"This variable controls whether assignments to unknown variables at top-level
(or in any other call to EVAL of SETQ) will implicitly declare the variable
SPECIAL. These values are meaningful:
:WARN -- Print a warning, but declare the variable special (the default.)
T -- Quietly declare the variable special.
NIL -- Never declare the variable, giving warnings on each use.")
$@$3$3$G(J, nil $@$r;XDj$7$F$*$1$P;d$,Ds=P$7$?$h$&$JLdBj$O$*$-$^$;$s(J. $@$G$b(J,
nil $@$O(J"$@@k8@$7$J$$(J"($@2?$8$c%3%j%c(J!)$@$3$H$G2sHr$7$F$$$k$o$1$G$9$h$M(J. $@CJ!9(J
$@F,$,:.Mp$7$FMh$?(J.
$@$3$NJQ?t$O(JCLtL2$@$K$O$"$j(J$@$^$;$s(J. CLtL2$@$G$O$3$N$h$&$J;~(J, $@$I$&$d$C$F(Jspecial
$@$r2sHr$9$k$N$G$7$g$&$+(J? $@$=$l$H$b(J, $@$=$b$=$b;d$,Ds<((J$@$7$?$h$&$J;H$$J}$,(J
$@LdBj$J$N$G$7$g$&$+(J?
CLtL2$@$NHO0O$GL@<(E*$K(J(proclaim '(special $@JQ?tL>(J))$@$H$5$l$k$N(J$@$rHr$1$kJ}(J
$@K!$O$J$$$h$&$K8+$($^$9!#$7$+$7Nc$($P<!$N$h$&$JJ}K!$O$$$+$,$G$7$g$&$+!)(J
(let ()
(declare (special x))
(setq x 1))
(defun tako (x) (print x))
$@:G=i$N%U%)!<%`$G$O(Jx$@$,(Jspecial$@JQ?t$H$7$F8=$l$^(J$@$9$,(J(declare (special
...))$@$O?;F)E*(J(pervasive)$@$G$O$J$$$N$G!"$R$g$C$H$9$k$H>>ED$5$s$NK>$_$N$3(J
$@$H$,$i$,(J$@C#@.$G$-$k$+$bCN$l$^$;$s!#(J
$@$A$J$_$K(JMacintosh$@$GF0:n$9$k(JMCL2.0$@$H$$$&=hM}7O$G$O$?$H$((Jproclamation$@$7(J
$@$F$*(J$@$$$F$b>>ED$5$s$NK>$_$NDL$j$KF0:n$7$F$7$^$$$^$9!#!J$D$^$j%P%0$G$9!K!#(J
--
Yasuaki Honda // honda@csl.SONY.co.jp
It's Sony Computer Science Laboratory Inc.
Technical Details
Message-ID:
<HONDA.92Jun26145110@popcorn.csl.sony.co.jp>Path:
arc1-ca.pugleaf.net!sparky!uunet!ccut!wnoc-tyo-news!scslwide!socslgw!nntp!hondaReferences:
<HMATSUDA.92Jun19193144@rc.cc.titech.ac.jp> <7910@ulisvax.ulis.ac.jp> <HMATSUDA.92Jun24100549@rc.cc.titech.ac.jp> <MOHRI.92Jun25225648@amber.math.keio.ac.jp> <HMATSUDA.92Jun26081718@rc.cc.titech.ac.jp>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: 1421c0,b0d9a7f81bdc7c6d X-Google-Attributes: gid1421c0,public X-Google-ArrivalTime: 1992-06-25 17:43:58 PST Path: arc1-ca.pugleaf.net!sparky!uunet!ccut!wnoc-tyo-news!scslwide!socslgw!nntp!honda From: honda@csl.sony.co.jp (Yasuaki Honda) Newsgroups: fj.lang.lisp Subject: Re: closure and special variable Message-ID: <HONDA.92Jun26145110@popcorn.csl.sony.co.jp> Date: 26 Jun 92 05:51:10 GMT References: <HMATSUDA.92Jun19193144@rc.cc.titech.ac.jp> <7910@ulisvax.ulis.ac.jp> <HMATSUDA.92Jun24100549@rc.cc.titech.ac.jp> <MOHRI.92Jun25225648@amber.math.keio.ac.jp> <HMATSUDA.92Jun26081718@rc.cc.titech.ac.jp> Sender: news@nntp.csl.sony.co.jp (Usenet News System) Distribution: fj Organization: Sony Computer Science Laboratory Inc., Tokyo, Japan Lines: 43 In-Reply-To: hmatsuda@cc.titech.ac.jp's message of 25 Jun 92 23:17:18 GMT Nntp-Posting-Host: popcorn.csl.sony.co.jp