From: Steve Lionel on
On 7/26/2010 1:48 PM, dpb wrote:

> Reorder such that the IMPLICIT statement (and all IMPLICIT statements)
> precede anything else in the program unit (program, subroutine or
> function) except possibly PARAMETER statements.

Any USE lines must come before IMPLICIT. In a program unit, this is the
only thing other than comments allowed before IMPLICIT.

--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
http://software.intel.com/en-us/forums/
Intel Software Development Products Support
http://software.intel.com/sites/support/
My Fortran blog
http://www.intel.com/software/drfortran
From: dpb on
Steve Lionel wrote:
> On 7/26/2010 1:48 PM, dpb wrote:
>
>> Reorder such that the IMPLICIT statement (and all IMPLICIT statements)
>> precede anything else in the program unit (program, subroutine or
>> function) except possibly PARAMETER statements.
>
> Any USE lines must come before IMPLICIT. In a program unit, this is the
> only thing other than comments allowed before IMPLICIT.

True; for some reason I was thinking was in the OW forum which is F77 so
doesn't have modules incorporated...

--


From: Steve Lionel on
On 7/26/2010 3:36 PM, James Van Buskirk wrote:
> I would also place the IMPORT statements before any IMPLICIT
> statements in an interface block. Looks like you can't mix USE
> with IMPORT, though.

I didn't mention IMPORT because you can use that only in an interface
body, and it wasn't relevant to the discussion. I don't spot anything
that would restrict a mix of USE and IMPORT, but the USE has to come first.

Page 14 of the F2003 standard has a nice diagram showing what goes where
and in which order.

--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
http://software.intel.com/en-us/forums/
Intel Software Development Products Support
http://software.intel.com/sites/support/
My Fortran blog
http://www.intel.com/software/drfortran