(j3.2006) are selectors allowed to be procedures ?

Jim Xia jimxia
Thu Oct 22 17:16:55 EDT 2009


j3-bounces at j3-fortran.org wrote on 10/22/2009 04:56:01 PM:

> >     interface
> >         subroutine foo
> >         end subroutine
> >     end interface
> > 
> >     interface
> >         function func (i)
> >             import foo
> >             procedure(foo), pointer :: func
> >         end function
> >     end interface
> > 
> >     associate (x => func(10))
> >         call x
> 
> Interface says FUNC is a function, so
> 
>     call x
> 
> looks like a syntax error at best.
> 
> In general, a <selector> is either <expr> or <variable>.  A subroutine 
> name does not qualify as either of these.


"func(10)" is an expression, is it not?  Then what is X?


Jim Xia

XL Fortran Compiler Test
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
Phone (905) 413-3444  Tie-line 313-3444
email: jimxia at ca.ibm.com
D2/YF7/8200 /MKM

http://www.ibm.com/software/awdtools/fortran/xlfortran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20091022/25fae6f4/attachment-0001.htm>



More information about the J3 mailing list