开发者

Why I can't set the common variable a property to be private or public?

开发者 https://www.devze.com 2023-03-16 16:31 出处:网络
In TCL\'s Itcl package the开发者_如何学Gore is a way to define a class and static members for that class using common keyword. But I have never seen that common variable was declared as private or pub

In TCL's Itcl package the开发者_如何学Gore is a way to define a class and static members for that class using common keyword. But I have never seen that common variable was declared as private or public? Can we do that? If no, then why?


The document for itcl stated that the keywords { private, public, protected } can be placed in front of { method, proc, variable or common } so the answer is yes, we can do that.

Reference: http://www.tcl.tk/man/itcl3.1/class.n.html

0

精彩评论

暂无评论...
验证码 换一张
取 消