Groups
Groups
Sign in
Groups
Groups
Lisp中国用户组
Conversations
About
Send feedback
Help
定义常量以及判断符号是否已经被绑定到全局变量或者常量
1 view
Skip to first unread message
panfei
unread,
Oct 12, 2012, 10:54:25 PM
10/12/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to lisp-...@googlegroups.com
[23]> (defconstant limit (+ pan 1))
LIMIT
[24]> (boundp '*glob*)
T
[25]> (boundp 'pan)
T
[26]> (boundp 'limit)
T
[27]> (boundp 'somthingvad)
NIL
[28]>
注意,全局变量可以被局部变量覆盖,而不能访问;而常量如果一旦设定,相应的常量名(符号)就不能再被再次绑定了。
--
不学习,不知道
Reply all
Reply to author
Forward
0 new messages