问题描述
在某些EDA工具的Tcl脚本(即Cadence Enounter)中,double ::有什么作用?
In some EDA tool's Tcl script (i.e Cadence Enounter), what does the double :: do?
report::TimeStamp PrePlace "START PrePlace"
推荐答案
它将名称空间(左侧)与包含在其中的名称(右侧)分开该命名空间.
It separates the namespace (on the left) from the name (on the right) contained in that namespace.
由于在Tcl脚本中,任何顶级构造都始终是命令,并且命令名称始终是命令的第一个单词,因此您的report::TimeStamp
在命名空间"report"中引用名为"TimeStamp"的命令.而"PrePlace"和"START PrePlace"是调用该命令时传递给该命令的两个参数.
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.
Tcl中的命名空间是动态实体,它们可能包含命令和变量(以及其他命名空间).
Namespaces in Tcl are dynamic entities and they may contain both commands and variables (and other namespaces).
这篇关于双冒号::在Tcl中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!