Re: help with module



rudra <bnrj.rudra@xxxxxxxxx> wrote:

module parameters
....
ntsite=nrsite+3 ! Dimension of AS Map

In this module,when i am definning like "ntsite=nrsite+3" and so on,
its giving error like
error #6274: This statement must not appear in the specification part
of a module
ntsite=nrsite+3 ! Dimension of AS Map
and so on for all the remainning lines. does it mean i cannot declare
values in module in this way?

That isn't a declaration at all. That is an assignment statement. An
assignment statement is an executable statement - not a declaration. The
distinction is really, really important and is one of the first things
you need to learn in Fortran. In fact, the assignment statement is
usually darn close to the first statement covered in a Fortran course.

Executable statements do things when they get executed in the course of
running the program. A module never gets executed, which is why it can't
have executable statements in it. Procedures in a module can get
executed (and can have executable statements in them), but that is not
the same thing as executing the module itself.

I can't tell what you are trying to do. In particular, I can't tell when
it is that you want these assignments to happen. There is no magic "make
this formula always be true" construct. You have to put the assignment
statements somewhere in the flow of code execution and then they are
executed whenever the code flow gets to them.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
.



Relevant Pages

  • Re: whats a callback?
    ... "Static" referes to local variables that retain their values between ... Static linking of a function (declared in a class ... declaration) means that all instances of that class use the same ... executing concurrently. ...
    (comp.arch.embedded)
  • Re: whats a callback?
    ... "Static" referes to local variables that retain their values between ... Static linking of a function (declared in a class ... declaration) means that all instances of that class use the same ... executing concurrently. ...
    (sci.electronics.design)