Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Re: Type extens...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 9 Topic 8550 of 8908
Post > Topic >>

Re: Type extension and renamed parent type

by Ron Ford <ron@[EMAIL PROTECTED] > Jul 27, 2008 at 10:28 PM

On Thu, 24 Jul 2008 10:50:56 -0700 (PDT), Tobias Burnus posted:

> Hello,
> 
> Assume the following Fortran 2003 source:
> 
> MODULE M
>   TYPE MOD_T
>      INTEGER :: I
>   END TYPE MOD_T
> END MODULE M
> 
> use m, only: local => mod_t
> type, extends(local) :: my_t
> end my_t
> type(my_t) :: my
> 
> Does "my" contain "my%local" or "my%mod_t" ?
> 
> According to NAG f95 it is "my%mod_t". I tried to read the Fortran
> standard, but I cannot get to a definite conclusion. Reading only
> "4.5.6 Type extension" I got the impression that "my%local" is
> correct. However, reading "11.2.1 The USE statement and use
> association", I'm not sure whether the parent name really changes or
> whether "local" is merely a "local identifier" for "mod_t" and thus
> the parent name stays "mod_t". Can someone help me with reading the
> standard?
> 
> "The parent type of an extended type is the type named in the EXTENDS
> attribute specification."
> "NOTE 4.49 The name of the parent type might be a local name
> introduced via renaming in a USE statement."
> "An extended type has a scalar, nonpointer, nonallocatable, 1 parent
> component with the type and type parameters of the parent type. The
> name of this component is the parent type name."
> 
> Tobias

I'm curious what motivates the question.  Is it to make a fortran
accounting of the use of 'my' in syntaxes like Perl?
-- 
We are here and it is now. Further than that, all human knowledge is
moon****ne. 3
H. L. Mencken
 




 9 Posts in Topic:
Type extension and renamed parent type
Tobias Burnus <burnus@  2008-07-24 10:50:56 
Re: Type extension and renamed parent type
Damian <damian@[EMAIL   2008-07-24 20:41:27 
Re: Type extension and renamed parent type
nospam@[EMAIL PROTECTED]   2008-07-24 22:32:33 
Re: Type extension and renamed parent type
paul.richard.thomas@[EMAI  2008-07-26 23:22:33 
Re: Type extension and renamed parent type
nospam@[EMAIL PROTECTED]   2008-07-26 23:44:32 
Re: Type extension and renamed parent type
Ron Ford <ron@[EMAIL P  2008-07-27 22:28:16 
Re: Type extension and renamed parent type
nospam@[EMAIL PROTECTED]   2008-07-27 22:05:17 
Re: Type extension and renamed parent type
paul.richard.thomas@[EMAI  2008-07-28 06:00:22 
Re: Type extension and renamed parent type
Ron Ford <ron@[EMAIL P  2008-07-28 13:39:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Nov 19 8:44:38 CST 2008.