Forum Discussion
Ryan_Moran
11 years agoValued Contributor
The short answer is yes.
The complicated answer is that you may not have a circular reference.
That is UNIT2 cannot reference UNIT1 if UNIT1 already references UNIT2.
If you need to access the same variables from each script consider adding a third unit.
You'll want to use the USEUNIT statement in the beggining of your script to link scripts:
http://support.smartbear.com/viewarticle/8921/?st=0
Then declare the global variable outside a function.
JScript Ex:
Unit1:
//USEUNIT UNIT3
function main(){
dostuff();
}
Unit2:
//USEUNIT UNIT3
function main2(){
dootherstuff();
}
Unit3:
company = new Array(5);
The complicated answer is that you may not have a circular reference.
That is UNIT2 cannot reference UNIT1 if UNIT1 already references UNIT2.
If you need to access the same variables from each script consider adding a third unit.
You'll want to use the USEUNIT statement in the beggining of your script to link scripts:
http://support.smartbear.com/viewarticle/8921/?st=0
Then declare the global variable outside a function.
JScript Ex:
Unit1:
//USEUNIT UNIT3
function main(){
dostuff();
}
Unit2:
//USEUNIT UNIT3
function main2(){
dootherstuff();
}
Unit3:
company = new Array(5);
Related Content
Recent Discussions
- 2 days agovladd1