From: VICTOR on
Hi,

i am importing this variable from one module into another:

INTEGER(I4B),INTENT(IN):: iStep

then i try to permor this multiplication:

DELT_dens = iStep*DeltaT

but for some reason the multiplication isn't performed. Is there any
other way of importing variables ? Thanks,

Victor



From: steve on
On Mar 31, 9:29 am, VICTOR <victor.hera...(a)gmail.com> wrote:
> i am importing this variable from one module into another:
>
>     INTEGER(I4B),INTENT(IN):: iStep
>
> then i try to permor this multiplication:
>
>     DELT_dens   = iStep*DeltaT
>
> but for some reason the multiplication isn't performed. Is there any
> other way of importing variables ? Thanks,

Show us the actual code. What compiler and command line?

--
steve
From: VICTOR on
On 31 Mar, 16:42, steve <kar...(a)comcast.net> wrote:
> On Mar 31, 9:29 am, VICTOR <victor.hera...(a)gmail.com> wrote:
>
> > i am importing this variable from one module into another:
>
> >     INTEGER(I4B),INTENT(IN):: iStep
>
> > then i try to permor this multiplication:
>
> >     DELT_dens   = iStep*DeltaT
>
> > but for some reason the multiplication isn't performed. Is there any
> > other way of importing variables ? Thanks,
>
> Show us the actual code.  What compiler and command line?
>
> --
> steve

This is a piece of the code:

Module Density

USE Nrtype, ONLY:I2B,I4B,DP
USE Commons, ONLY: DeltaT, npoin, Time_Density,Density_file,DensityT,
Density_log
USE DIMENSIONS, ONLY: Dens,SlopeDens,Node_Dens, ProperPoin
USE MEMRAM,ONLY: AllMem,FreeMem

Contains

Subroutine ReadDensity(iStep)

Implicit None

INTEGER(I4B),INTENT(IN):: iStep
REAL(DP)::Dt_dens,ET_dens,DELT_dens,C_DELT_dens,i,k, Nlop
!CHARACTER(kind = 1, LEN = 10):: AAA

Density_log = .TRUE.

! ALLOCATE MEMORY :
CALL AllMem(8) ! Module MemRAM

DELT_dens = iStep*DeltaT !Se comenta para no actualizar el paso
de tiempo
C_DELT_dens = (DELT_dens/DensityT) !COPIA DE LA VARIABLE

..
..
End Subroutine ReadDensity

End Module Density

Compaq Visual Fortran 6.6
From: Richard Maine on
VICTOR <victor.herasme(a)gmail.com> wrote:

> On 31 Mar, 16:42, steve <kar...(a)comcast.net> wrote:
> > On Mar 31, 9:29 am, VICTOR <victor.hera...(a)gmail.com> wrote:
> >
> > > i am importing this variable from one module into another:
> >
> > > INTEGER(I4B),INTENT(IN):: iStep
> >
> > > then i try to permor this multiplication:
> >
> > > DELT_dens = iStep*DeltaT
> >
> > > but for some reason the multiplication isn't performed. Is there any
> > > other way of importing variables ? Thanks,

> This is a piece of the code:
[elided]

Still not nearly enough information. This is a classic case of the most
common mistake encountered here - an mistake which has little to do with
Fortran and everything to do with how to ask for help.

When you have to ask for help, that is (obviously) because you don't
understand exactly what is happening. (This is a universal principle;
the "you" is not meant personally.) So you need to tell us exactly what
you are seeing - *NOT* your interpretation of what you are seeing. "The
multiplication is not performed" is your interpretation. I'm quite sure
you are not seeing a message saying "the multiplication is not
performed". Since that clearly is not actually what is happening, we
have the problem of first trying to deduce what you are talking about;
that's a harder problem than debugging the Fortran code - probably a
much harder problem.

Debuging Fortran code is something that some here are pretty good at.
Our crystal ball gazing to figure out what you are seeing is a bit more
shaky. I have been known to see flashes of vision in the crystal ball,
but it is all just clouds at the moment.

(Speaking of deducing what you are talking about, you have shown nothing
to do with importing from modules. That is something done with a USE
statement. You have some USE statements, but none involving iSTEP).

If we are to have much chance of helping you, you are going to need to
tell us what you are actually seeing - *NOT* your interpretation or
understanding of it. Show us the raw data without your interpretation.

There is next to zero information here to go on. "The multiplication is
not performed" is too far from plausible for me to even guess what you
are seeing (and thus to guess what the problem is).

You are also probably going to have to show us more of the code. You
have shown just the part that you have guessed the problem to lie in.
Odds are fairly high that you misguessed that.

It is hard for me to get more specific in saying what is needed. I don't
even see enough data to point in the direction of what more to ask for.
If I though there was even a miniscule chance that your description was
accurate, I'd ask for you to show (possibly by printing it) what the
value of iStep was right before the assignment stament with the
multiplication that you mention. Note that doesn't mean to show what
value it has somewhere else, assuming that it will be the same there.
Then I'd ask you to show what value of DELT_dens was right after the
assignment statement. Again, that doesn't mean what value it has
somewhere else. If I really believed that there was a problem in the
multiplication, that would be the first set of questions. But since I
don't believe that, it isn't a very useful set.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: robert.corbett on
On Mar 31, 7:29 am, VICTOR <victor.hera...(a)gmail.com> wrote:
> Hi,
>
> i am importing this variable from one module into another:
>
> INTEGER(I4B),INTENT(IN):: iStep
>
> then i try to permor this multiplication:
>
> DELT_dens = iStep*DeltaT
>
> but for some reason the multiplication isn't performed. Is there any
> other way of importing variables ? Thanks,
>
> Victor

How do you know the multiplication is not performed? Are
you certain the statement is executed? Have you tried
running under a debugger and tried placing a breakpoint on
the statement?

Bob Corbett