Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran] Pb with FORALL and CONTAINS for extract subroutine refactoring

Title: cordialement.txt
Le 02/04/2010 15:35, DEVEL Michel a écrit :

Similarly I also get another syntax error in a subroutine with a "contains" that disappears when I comment the contains and the subsequent internal subroutine

In fact the Pb disappears if I put a RETURN before the CONTAINS:
i.e.:

 9999 RETURN

      Contains
      Real(kind=r_) Function Norm(VECT)
         Real(kind=r_),intent(in) :: VECT(:)
         NORM = SQRT( DOT_PRODUCT(VECT,VECT) )
      END Function NORM

      END

instead of

      Contains
      Real(kind=r_) Function Norm(VECT)
         Real(kind=r_),intent(in) :: VECT(:)
         NORM = SQRT( DOT_PRODUCT(VECT,VECT) )
      END Function NORM

9999 END

rem: It was considered a syntax error neither by gfortran nor ifort.

I will update buzilla correspndingly.

--
Cordialement,

Michel DEVEL

Back to the top