GerritGroot
Technical User
Hi,
Using gfortran, if I have a code like
that works and another one like
That doesn't work. What can be the cause?
(In the example they both work btw, but the second option in my code causes gfortran's executable to get stuck in a sort of endless loop)
Thanks,
Gerrit
(My reaction may be slow this week, lots of meetings and so on..)
Using gfortran, if I have a code like
Code:
[COLOR=purple]PROGRAM[/color] [COLOR=blue]Test[/color]
[COLOR=purple]IMPLICIT NONE[/color]
[COLOR=purple]REAL[/color] :: [COLOR=blue]y,MyFunc[/color]
y=[COLOR=blue]MyFunc[/color](2.)
[COLOR=purple]WRITE[/color](*,*)y
[COLOR=purple]END PROGRAM[/color] [COLOR=blue]Test[/color]
[COLOR=purple]REAL FUNCTION[/color] [COLOR=blue]MyFunc[/color](x)
[COLOR=purple]REAL, INTENT[/color](IN) :: x
MyFunc=x**2
[COLOR=purple]END FUNCTION[/color] [COLOR=blue]MyFun[/color]
that works and another one like
Code:
[COLOR=purple]PROGRAM[/color] [COLOR=blue]Test[/color]
[COLOR=purple]IMPLICIT NONE[/color]
[COLOR=purple]REAL[/color] :: [COLOR=blue]MyFunc[/color]
[COLOR=purple]WRITE[/color](*,*)[COLOR=blue]MyFunc[/color](2.)
[COLOR=purple]END PROGRAM[/color] [COLOR=blue]Test[/color]
[COLOR=purple]REAL FUNCTION[/color] [COLOR=blue]MyFunc[/color](x)
[COLOR=purple]REAL, INTENT[/color](IN) :: x
MyFunc=x**2
[COLOR=purple]END FUNCTION[/color] [COLOR=blue]MyFun[/color]
That doesn't work. What can be the cause?
(In the example they both work btw, but the second option in my code causes gfortran's executable to get stuck in a sort of endless loop)
Thanks,
Gerrit
(My reaction may be slow this week, lots of meetings and so on..)