Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: use module ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 12 of 19 Topic 8158 of 8767
Post > Topic >>

Re: use module to pass data between procedures

by Mike <SulfateIon@[EMAIL PROTECTED] > Apr 24, 2008 at 12:20 AM

On Apr 24, 12:24=A0pm, Mike <Sulfate...@[EMAIL PROTECTED]
> wrote:
> On Apr 23, 10:31=A0pm, nos...@[EMAIL PROTECTED]
 (Richard Maine) wrote:
>
> > Dave Seaman <dsea...@[EMAIL PROTECTED]
> wrote:
> > > The problem is
> > > using the same name in two conflicting ways.
>
> > And for all the compications in the standard-speak technically
defining
> > it, it ain't exactly rocket science. The compiler needs to know what
you=

> > are talking about. If a single scope has both an SZ as a dummy
argument
> > and an SZ as a module variable,
>
> May I ask what "scope" is?
> I do have SZ as the dummy argument in the procedures of many modules.
> I also have SZ as a module variable (thank you for this term), just
> like the beginning example. =A0I also use this module in main program.
>
> >then when you say SZ, it has no way to
> > tell which one is meant. That's all.
>
> Why?
> I mean I use the module containing SZ (module variable) in main
> program. =A0Then I call some procedure of some module with SZ as a dummy
> argument. =A0Yes, it sound weird. =A0If I want to do this. =A0Then I
don't=

> need to declare SZ as a module variable.
> But I need to know the background logic. Then I can go back to the
> problem I have.
> Thank you.
>
>
>
> > If you do need to access both things, there are ways to, for example,
> > rename the module variable for the scope in question. But I have a
> > feeling that perhaps the OP actually wants a dummy argument and a
module=

> > variable to actually be the same thing instead of just having access
to
> > one.
>
> I never use SAVE, so I have this problem.
> I'd like to pass the argument to some function defined like this:
> SUBROUTINE FCN (N, X, F)
> call some_procedure(SZ,......) =A0<=3D=3D SZ here , but I cannot add one
> argument in FCN, since it is an argument (I mean like intrinsic
> function)in some IMSL subroutine.
>
> I used to use comment, but it's not good as you have mentioned.
                common
> So I have to declare a module variable SZ. =A0Now the problem comes out:
> SZ as a module var. and also as a dummy argument in some procedure.
>
> thank you very much for your help.
> Mike
 




 19 Posts in Topic:
use module to pass data between procedures
Mike <SulfateIon@[EMAI  2008-04-22 01:22:42 
Re: use module to pass data between procedures
Arjen Markus <arjen.ma  2008-04-22 01:36:33 
Re: use module to pass data between procedures
"A. Belli" <  2008-04-22 10:42:02 
Re: use module to pass data between procedures
"Les" <l.nei  2008-04-22 10:03:32 
Re: use module to pass data between procedures
Mike <SulfateIon@[EMAI  2008-04-22 07:38:31 
Re: use module to pass data between procedures
nospam@[EMAIL PROTECTED]   2008-04-22 08:14:07 
Re: use module to pass data between procedures
"Les" <l.nei  2008-04-22 16:32:56 
Re: use module to pass data between procedures
Mike <SulfateIon@[EMAI  2008-04-23 01:30:23 
Re: use module to pass data between procedures
Dave Seaman <dseaman@[  2008-04-23 12:26:25 
Re: use module to pass data between procedures
nospam@[EMAIL PROTECTED]   2008-04-23 07:31:38 
Re: use module to pass data between procedures
Mike <SulfateIon@[EMAI  2008-04-23 21:24:49 
Re: use module to pass data between procedures
Mike <SulfateIon@[EMAI  2008-04-24 00:20:54 
Re: use module to pass data between procedures
Mike <SulfateIon@[EMAI  2008-04-24 00:38:34 
Re: use module to pass data between procedures
Dave Seaman <dseaman@[  2008-04-24 13:20:47 
Re: use module to pass data between procedures
Mike <SulfateIon@[EMAI  2008-04-24 19:32:55 
Re: use module to pass data between procedures
Dave Seaman <dseaman@[  2008-04-25 03:28:09 
Re: use module to pass data between procedures
Mike <SulfateIon@[EMAI  2008-04-25 23:42:48 
Re: use module to pass data between procedures
Dave Seaman <dseaman@[  2008-04-26 15:13:03 
Re: use module to pass data between procedures
Mike <SulfateIon@[EMAI  2008-04-26 00:36:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 12:59:29 CDT 2008.