Double colon :: in Tcl

丶灬走出姿态 提交于 2019-12-08 07:06:30

问题


In some EDA tool's Tcl script (i.e Cadence Enounter), what does the double :: do?

report::TimeStamp PrePlace "START PrePlace"

回答1:


It separates the namespace (on the left) from the name (on the right) contained in that namespace.

Since in a Tcl script any top-level construct is always a command, and the command's name is always the first word of the command, your report::TimeStamp refers to a command named "TimeStamp" in a namespace named "report" while "PrePlace" and "START PrePlace" are two arguments passed to that command when it's invoked.

Namespaces in Tcl are dynamic entities and they may contain both commands and variables (and other namespaces).



来源:https://stackoverflow.com/questions/33441093/double-colon-in-tcl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!