(j3.2006) Unlimited polymorphic and LOCK_TYPE (and EVENT_TYPE)

Bill Long longb
Mon Jun 2 16:37:23 EDT 2014


On Jun 1, 2014, at 10:06 PM, Malcolm Cohen <malcolm at nag-j.co.jp> wrote:

> On May 30, 2014, at 7:01 PM, Van Snyder <Van.Snyder at jpl.nasa.gov> wrote:
>> There needs to be a constraint against the <source-expr> being of type
>> LOCK_TYPE (or EVENT_TYPE in the TS) if any <allocate-object> is
>> unlimited polymorphic.
> 
> I do not see why you think that.
> 
> Bill Long replied:
>> If the <source-expr> is type  X  does that not make the <allocate-object> also 
>> type X, and no longer unlimited polymorphic?
> 
> The declared type of <allocate-object> is not affected by <source-expr>.

Sure, but the question was about dynamic type. So, is the following is not allowed:

class(*),allocatable :: myevent[:]
?
allocate (event_type :: myevent[*] )


Cheers,
Bill



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





More information about the J3 mailing list