0
我在的Specman下面的代碼:如何在specman中創建對變量的引用?
var x := some.very.long.path.to.a.variable.in.another.struct;
while (x == some_value) {
//do something that uses x;
//wait for something
//get a new value for x
x = some.very.long.path.to.a.variable.in.another.struct;
};
現在,似乎浪費寫的分配x
兩次;一次在初始化期間,一次在循環期間。
我真的想用是長變量名的參考,這樣我就可以這樣做:
var x := reference to some.very.long.path.to.a.variable.in.another.struct;
while (x == some_value) {
//do something that uses x;
//wait for something
//no need to update x now since it's a reference
};
可這的Specman辦呢?