(j3.2006) (SC22WG5.5615) RE: F08/0139??

Whitlock, Stan stan.whitlock
Sat Dec 19 15:45:21 EST 2015


Hi, Bill - I'm sure what you are seeing but interp F08/0139 in N2092 looks like this:

----------------------------------------------------------------------

NUMBER: F08/0139
TITLE: Is the name of an external procedure that has a binding label
       a local identifier?
KEYWORDS: TRANSFER, zero-sized scalar
DEFECT TYPE: Erratum
STATUS: Passed by J3 meeting

QUESTION:

Consider the program fragment:

  Subroutine s() Bind(C,Name='Hello')
      Print *,'Hello'
  End Subroutine
  Subroutine s() Bind(C,Name='World')
    Print *,'World'
  End Subroutine

This does not conform to Fortran 2003, and is not listed as an
extension in the Introduction to Fortran 2008, but the rules for
global names seem to indicate that this is now conforming.

Is this extension deliberate?

ANSWER:

Yes, this was a deliberate change to the Fortran standard.
An edit is provided to mention this in the Introduction.

EDITS:

[xvi] Introduction, paragraph 2, bullet "Programs and procedures",
      append to paragraph
        "The name of an external procedure that has a binding label
         is a local identifier and not a global identifier.".

SUBMITTED BY: Malcolm Cohen

HISTORY: 15-177    m207  F08/0139 submitted - passed by J3 meeting

----------------------------------------------------------------------

What are you seeing?

Thanks				/Stan

-----Original Message-----
From: j3-bounces at mailman.j3-fortran.org [mailto:j3-bounces at mailman.j3-fortran.org] On Behalf Of Bill Long
Sent: Saturday, December 19, 2015 2:41 PM
To: fortran standards email list for J3
Subject: (j3.2006) F08/0139??

Interp F08/0139 (now out for ballot) starts with


--

QUESTION:


Consider the program fragment:

  Subroutine s() Bind(C,Name='Hello')
      Print *,'Hello'
  End Subroutine
  Subroutine s() Bind(C,Name='World')
    Print *,'World'
  End Subroutine

--

without any further context.  So, this could be part of the following program:

program ambiguous

  call s

contains

  Subroutine s() Bind(C,Name='Hello')
      Print *,'Hello'
  End Subroutine
  Subroutine s() Bind(C,Name='World')
    Print *,'World'
  End Subroutine

end program ambiguous

We didn't really intend for this to be conforming, did we?  I think this interp needs a clearer example/question.

Cheers,
Bill

Bill Long                                                                       longb at cray.com
Fortran Technical Support  &                                  voice:  651-605-9024
Bioinformatics Software Development                     fax:  651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101


_______________________________________________
J3 mailing list
J3 at mailman.j3-fortran.org
http://mailman.j3-fortran.org/mailman/listinfo/j3



More information about the J3 mailing list