Usage of extern in mod file
Posted: Tue Dec 13, 2011 10:59 pm
Hi,
I am trying extern keyword to access from one mod file (b.mod) to one variable (var) declared as ASSIGNED block in the other mod file (a.mod). First I added VERBATIM block including extern satement to b.mod as below;
VERBATIM
extern double var_a;
ENDVERBATIM
What I am confused about is then how to use var_a in b.mod. The usage of var_a as a global variable in b.mod has made compilation error. Can anyone give some advice on how to use the keyword extern in mod file?
Thanks so much.
I am trying extern keyword to access from one mod file (b.mod) to one variable (var) declared as ASSIGNED block in the other mod file (a.mod). First I added VERBATIM block including extern satement to b.mod as below;
VERBATIM
extern double var_a;
ENDVERBATIM
What I am confused about is then how to use var_a in b.mod. The usage of var_a as a global variable in b.mod has made compilation error. Can anyone give some advice on how to use the keyword extern in mod file?
Thanks so much.