Prev: This implicit statement is not positioned correctly within the scope unit
Next: When to Declare an External Function as EXTERNAL in a Module ??
From: James Van Buskirk on 26 Jul 2010 15:36 "Steve Lionel" <steve.lionel(a)intel.invalid> wrote in message news:8b61gnFk1gU1(a)mid.individual.net... > 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. 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 think you can freely mix PARAMETER, FORMAT, and ENTRY statements with IMPLICIT statements, N1826.pdf, R206. -- write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, & 6.0134700243160014d-154/),(/'x'/)); end
From: James Van Buskirk on 27 Jul 2010 00:11
"Steve Lionel" <steve.lionel(a)intel.invalid> wrote in message news:8b6r6kF5ubU1(a)mid.individual.net... > 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 |