Re: This implicit statement is not positioned correctly within the scope unit



"Steve Lionel" <steve.lionel@xxxxxxxxxxxxx> wrote in message
news:8b6r6kF5ubU1@xxxxxxxxxxxxxxxxxxxxx

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.

It was tricky to express this without a lot of tedious verbiage but
I thought it was clear that I made use of the same sense of 'mix' in
both the quoted and elided paragraphs. Yes, you can have USE and
IMPORT statements in the same interface body, but the forbidden
'mixing' I was referring to was that of placing any IMPORT statement
before any USE statement (N1826.pdf, R204, also Table 2.1, section 2.3.2).

This kind of 'mixing' is allowed between IMPLICIT and three other
kinds of statements (Table 2.1) except that IMPLICIT NONE can't 'mix'
with PARAMETER statements.

--
write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, &
6.0134700243160014d-154/),(/'x'/)); end


.



Relevant Pages

  • Re: using iso_c_binding
    ... IMPLICIT NONE ... Unexpected data declaration statement in INTERFACE block at ... Fatal Error: Can't open module file 'ftn_c.mod' for reading at: No ...
    (comp.lang.fortran)
  • Scope of implicit none
    ... Check the scope of implicit none ... The error message with gfortran is that the function f has no IMPLICIT ... inside an interface block. ...
    (comp.lang.fortran)