variable content lost



Hi,
I just started writing in Fortran90 using gfortran on Mac OSX. At the
moment I am startled by this issue, which I couldnt resolve on my own:
[code]
....
write (*, '(A,F5.2)') "before:", fib%r(id,1)
call segment_distance(fib%r(id,1:3), fib%p(id,:), fib%r(m,:),&
fib%p(m,:))
write (*, '(A,F5.2)') "after", fib%r(id,1)
....
subroutine segment_distance(r, p, rr, pp)
real(dp), dimension(3), intent(in) :: r, p, rr, pp
....
end subroutine segment_distance
[/code]
The first write results in the expected "before:11.00" (defined some
place before). But I do not understand why I get "after 0.00".
If further information is required, I will happily provide more
details.
I would be glad if someone could give me a hint here.

Christian

.



Relevant Pages

  • Re: type/rank mismatch error
    ... I'm using gfortran 4.3.0 on Mac OSX 10.4.8. ... I'm having a problem compiling a two modules and a main. ... SUBROUTINE some_op ...
    (comp.lang.fortran)
  • Re: Win32 API and gfortran
    ... Call Win32 API from gfortran is possible, ... SUBROUTINE FortranSub() ... END SUBROUTINE FortranSub ...
    (comp.lang.fortran)
  • Re: Allocatable arrays in derived types
    ... The thing that makes me feel a little queasy is that gfortran ... doesn't have the capability to express the stride in units ... subroutine str1 ... character), pointer:: p ...
    (comp.lang.fortran)
  • Re: fortran 90/95 standart
    ... SUBROUTINE eval ... IMPLICIT REAL ... Can you update to a newer compiler 4.0.1 is fairly in gfortran development? ... The previous version was mixing C and fortran subroutines and is not used anymore It is not a good candidate for testing a new compiler! ...
    (comp.lang.fortran)
  • Re: locating numerical differences in g77 to gFortran conversion
    ... The code comprises several hundred thousand lines of ... mostly fortran 77 code, with some ancient fortran, c and c++ thrown in. ... I've managed to build the project with gcc 4 / gFortran. ... Correct argument type on a subroutine or function call. ...
    (comp.lang.fortran)