Re: why doesn't this compile ?
- From: Richard E Maine <nospam@xxxxxxxxxxxxx>
- Date: Thu, 28 Apr 2005 11:17:49 -0700
In article <d4r7mu$arq$1@xxxxxxxxxxxxxxxx>,
Ken Fairfield <my.full.name@xxxxxxxxx> wrote:
> f90/stand=f95 TEST_ARRAY_ARGUMENTS2
>
> was successful with no errors,...
> My question whether the VMS Fortran compiler support of
> "module procedure" in the main program is a compiler *extension*,
> or is this standard-conforming F95? What about F2003??
Because it gives no errors, even with /stand=f95, it counts as a
compiler violation of the standard (i.e. bug) rather than an extension.
As mentioned elsewhere, this is a constraint, which means that the
standard requires diagnosis. If a suitable message were added with
/stand=f95, then it would count as an extension.
As mentioned later in the posting, the keyword "module" must be dropped
to make it standard f2003.
> Which begs the question: how *would* you define an generic
> interface to program-contained procedures under F95? I'd like
> to see an example of the awkwardness, both for education and
> for entertainment. :-) :-)
In standard f95, the only way I off-hand know of to do it is to move
them into a module (making any necessary changes if, for example, host
association was used and can't be any more). Maybe someone else can
think up a trick that I don't know. (I'm talking about how to make it
standard - not how to fool compilers - I might be able to come up with
tricks that might fool at least some compilers - I'm not sure and
haven't tried). This probably counts as substantial awkwardness in some
cases. Life can get worse in the case of external procedures that might
be USEing the module where the generic interface block is. Just putting
such an external procedure into a (separate) module can result in
circular module usage, which is illegal. This can drive you towards
putting everything in one big module, which causes other problems.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- References:
- why doesn't this compile ?
- From: Bart Vandewoestyne
- Re: why doesn't this compile ?
- From: Richard E Maine
- Re: why doesn't this compile ?
- From: beliavsky
- Re: why doesn't this compile ?
- From: Richard Maine
- Re: why doesn't this compile ?
- From: Bart Vandewoestyne
- Re: why doesn't this compile ?
- From: Richard E Maine
- Re: why doesn't this compile ?
- From: Ken Fairfield
- why doesn't this compile ?
- Prev by Date: Re: why doesn't this compile ?
- Next by Date: Re: strange linking problem
- Previous by thread: Re: why doesn't this compile ?
- Next by thread: Re: why doesn't this compile ?
- Index(es):
Relevant Pages
|