Re: Host variable inheritance
- From: Dan Nagle <dannagle@xxxxxxxxxxx>
- Date: Thu, 27 Apr 2006 21:09:14 GMT
Hello,
The chances of any version not very close to what's already
defined for interface blocks will most likely face a difficult
course.
If you think it's important, come argue your case.
James Giles wrote:
Dan Nagle wrote:Hello,
Joe Krahn wrote:Here's one more idea to help avoid unexpected bugs in CONTAINedIt's been considered, but it never made the threshold.
procedures: How about an INHERIT statement to control the
accessibility of host variables, i.e.:
INHERIT :: a,b,c
or
INHERIT NONE
Maybe something like this is already in the works?
If more folks were on J3, perhaps it would have.
Or, if more folks were aware that the committee was remotely
interested (though public debate of the possibility) and consequently
made their own support known, the existing members might have
perceived the need more acutely.
--
In any case, I've mentioned the feature many times in this forum.
My present version (in my toy language) is:
IMPORT :: rename-list
If a name isn't on the IMPORT list, you can still access it with
a qualified name:
hostname..entityname
or
_..entityname
The latter form is for case where the contained procedure is
in an INCLUDE file and therefore doesn't necessarily know
the name of the host. Whether that's a good idea or not is
still debatable. After all, how does it know the entity name
either? My rule is: try to figure all variations of a feature
and weed out the overkill later.
This is a special case of the IMPORT statement, which is what
I have instead of USE (mainly because I just get tired of writing
descriptions of Fortran code that have the phrase "then you use USE"
or some such thing).
The Fortran version could be to say
USE, ONLY: rename-list
A USE without a module name would be interpreted as
referring to the host. An empty rename-list would mean
that nothing was inherited by host association - unless Fortran
also chose to allow qualified names.
--
Cheers!
Dan Nagle
Purple Sage Computing Solutions, Inc.
.
- Follow-Ups:
- Re: Host variable inheritance
- From: Joe Krahn
- Re: Host variable inheritance
- From: James Giles
- Re: Host variable inheritance
- References:
- Host variable inheritance
- From: Joe Krahn
- Re: Host variable inheritance
- From: Dan Nagle
- Re: Host variable inheritance
- From: James Giles
- Host variable inheritance
- Prev by Date: Re: New style DO syntax?
- Next by Date: Re: Host variable inheritance
- Previous by thread: Re: Host variable inheritance
- Next by thread: Re: Host variable inheritance
- Index(es):
Relevant Pages
|