Je le code suivant dans specman:comment puis-je créer une référence à une variable dans 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;
};
Maintenant, il semble inutile d'écrire l'affectation à x
deux fois; une fois pendant l'initialisation et une fois pendant la boucle.
Ce que je veux vraiment utiliser est une référence à long nom de variable, de sorte que je pouvais faire:
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
};
cela peut-il être fait en specman?