(j3.2006) Abstract type question

Van Snyder Van.Snyder
Fri Mar 28 20:47:43 EDT 2008


On Fri, 2008-03-28 at 19:09 -0500, Bill Long wrote:
> With reference to the current CD (though similar issues are in f03),  
> [49:C406] says that you cannot have a declaration of 
> TYPE(<abstract-type>).  This is what I expect, and seems to be a 
> fundamental distinction of abstractness.
> 
> However, you can have a polymorphic entity declared with an abstract 
> type, as in CLASS(T) where T is an abstract type.  In fact, [124:C627] 
> specifically anticipates that you can have an <allocate-object> of 
> abstract type.
> 
> Questions:
> 
> 1) The first sentence of para 5 of 4.3.1.3 CLASS (page 50) says "A 
> polymorphic allocatable object may be allocated to be of any type with 
> which it is type compatible."  Does this include the base abstract type 
> used in the declaration?  If so, it would seem to contradict the idea of 
> not having objects whose dynamic type is abstract. And the sentence in 
> para 4, "A polymorphic entity that is not a unlimited polymorphic entity 
> is type compatible with entities of the same declared type or any of its 
> extensions."  seems to suggest you can have type compatibility with your 
> own declared abstract type.
> 
> 2) In the list of constraints following the syntax for the ALLOCATE 
> statement, I do not see a constraint that says "If <type-spec> appears, 
> it shall not specify an abstract type".   Should that be the case? Or is 
> this covered somewhere else?
> 
> I think I know what the answer is supposed to be here, but I'm looking 
> for the words. I suspect I just missed something, but clarification 
> would be appreciated.

In 08-007r1, It's C403 on page 49.

Van





More information about the J3 mailing list