Vivek Rao wrote:
> Especially someone who has proposed many features in Fortran 2008 should be
> aware that several compiler vendors have decided not to produce compilers beyond Fortran 95 (except for some TR's). Silverfrost is one example. Lahey, which allied with Fujitsu, is another. Maybe someone can comment about Pathscale.
>
I believe that Pathscale is planning to continue forward. Vendor
decisions are influenced by customer demand. If customers get
accustomed to using the new features in F03 and F08, vendors who want
their business can change their minds about what they will provide.
> Fortran 2008 has been finalized, right? The committee should restrict itself to maintenance mode until full F2008 compilers are available.
>
I would expect full F08 compilers to be available by the end of 2011.
The committee could spend the next year or so doing maintenance
(interps, finishing active TR projects) and then start prioritizing new
features in 2012. I don't get to make that decision, but it seems like
a reasonable schedule to me.
Cheers,
Bill
> Vivek Rao
>
> --- On Thu, 8/5/10, Van Snyder <[log in to unmask]> wrote:
>
>> From: Van Snyder <[log in to unmask]>
>> Subject: Re: Reusing an interface for procedure-type arguments
>> To: [log in to unmask]
>> Date: Thursday, August 5, 2010, 7:07 PM
>> On Thu, 2010-08-05 at 15:51 -0700,
>> Tobias Brandt wrote:
>>> Thank you very much for your quick answer. At least
>> now I know I don't
>>> have to search for a Fortran 90 solution any longer.
>> :-)
>>
>> According to the table in ACM Fortran Forum, several
>> Fortran compilers,
>> that is, the most widely used ones (Cray, g95, gfortran,
>> IBM, Intel,
>> NAG) have implemented abstract interfaces and procedure
>> pointers. Sun
>> apparently has not. Many of those have made
>> significant progress toward
>> complete compliance with the 2003 standard, and have even
>> implemented a
>> few features of the 2008 standard.
>>
>> You would have to contact PGI, Pathscale, Silverfrost,
>> Fujitsu...
>> directly to ask them how much of Fortran 2003 or 2008 they
>> support.
>>
>>> On 6 August 2010 00:40, Van Snyder <[log in to unmask]>
>> wrote:
>>> Tobias:
>>>
>>> It's not
>> possible in Fortran 90 or Fortran 95, but in Fortran
>>> 2003 or
>>> Fortran 2008 you
>> can define an abstract interface thus:
>>>
>>> abstract interface
>>> subroutine F
>> ( Arg )
>>> real
>> :: Arg
>>> end
>> subroutine F
>>> end interface
>>>
>>> You can then
>> access that interface either within the same
>>> scope as its
>>> definition, or
>> by use or host association, and declare a
>>> procedure
>>> pointer,
>> procedure dummy argument, or type-bound procedure by
>>> reference
>>> to it:
>>>
>>> subroutine Some_Sub
>> ( A, My_F )
>>> real :: A
>>> procedure(F)
>> :: My_F
>>> ....
>>> end subroutine
>> Some_Sub
>>>
>>> See subclauses
>> 4.5.3, 4.5.4, 12.3.2.1 and 12.3.2.3 of
>>> http://j3-fortran.org/doc/year/04/04-007.pdf.
>>>
>>>
>>>
>>> On Thu,
>> 2010-08-05 at 15:09 -0700, Tobias Brandt wrote:
>>> > Hi all,
>>> > I'm just
>> starting out with Fortran 90 coming from C++ and
>>> need some
>>> > help. In
>> C++ you can define a function pointer type like so:
>>> >
>>> >
>>> > typedef
>> void (*mytype) (float);
>>> >
>>> >
>>> > and then
>> use it as a type for function parameters:
>>> >
>>> >
>>> > void
>> some_function (float a, mytype f)
>>> > {
>>> >
>> f(a);
>>> > }
>>> >
>>> >
>>> > void
>> some_other_function (float a, mytype f)
>>> > {
>>> >
>> f(2*a);
>>> > }
>>> >
>>> >
>>> >
>>> >
>>> > Now, if I
>> want to do the same in Fortran 90, I have to
>>> define the same
>>> > inteface
>> twice:
>>> >
>>> >
>>> > subroutine
>> some_sub (a, f)
>>> >
>> real :: a
>>> >
>> interface
>>> >
>> subroutine f (arg)
>>> >
>> real :: arg
>>> >
>> end subroutine
>>> >
>> end interface
>>> >
>> call f(a)
>>> > end
>> subroutine
>>> >
>>> >
>>> > subroutine
>> some_sub (a, f)
>>> >
>> real :: a
>>> >
>> interface
>>> >
>> subroutine f (arg)
>>> >
>> real :: arg
>>> >
>> end subroutine
>>> >
>> end interface
>>> >
>> call f(2*a)
>>> > end
>> subroutine
>>> >
>>> >
>>> >
>>> >
>>> > Is it
>> possible to somehow "reuse" the interface definition
>>> by
>>> > declaring
>> it outside the subroutines or in a different
>>> module?
>>> >
>>> >
>>> > Regards,
>>> > Tobias
>>>
>>>
>>>
--
Bill Long [log in to unmask]
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
|