Page 1 of 1

Usage of extern in mod file

Posted: Tue Dec 13, 2011 10:59 pm
by magpie
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.

Re: Usage of extern in mod file

Posted: Wed Dec 14, 2011 7:46 pm
by ted
First of all, this is not the way to specify that a variable that is declared in one mod file is to be linked to a variable in a different mod file. Second, even if it was, this may not be the way to accomplish your objective.

So please take a step back and explain what is your objective. If this is in any way proprietary, feel free to email the information to me
ted dot carnevale at yale dot edu