P Suckling wrote:
...
> I don't know if any move has been made to address this issue with Fortran
> 2000, but if not, can I suggest something like the following for some future
> version of fortran:
>
> USE HOST, NONE
> to say you don't want to obtain any variables by host association
>
> USE HOST, ONLY : [local_name =>] host_name, ...
> as with modules, but for host associated variables, and
>
> USE HOST
> to do the default which is to leave all variables available for host
> association.
>
> Even better would be the inclusion of an additional attribute that could be
> added to the above syntax would serve a similar purpose to that of the INTENT
> attribute. It could indicate whether you want to allow this variable to be
> changed by the module procedure or not.
I've recommended before that the default should have been something
like your USE HOST, NONE. I would prefer the syntax to be a little
different.
IMPORT : only-list ! imports only those things named (or renamed) on the
list
or (current default)
IMPORT ALL
or (my preferred default)
IMPORT NONE
Note that my only objection to your syntax is that it requires HOST to
be a reserved name that can't be used as a MODULE name.
--
J. Giles
|