Re: why doesn't this compile ?



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
.



Relevant Pages

  • Re: Is C99 the final C? (some suggestions)
    ... > that someone will try compile their stuff on an old compiler. ... > because the ANSI standard obsoleted them, and everyone picked up the ANSI ... fixed by using another language. ... >>are multiplying two expressions of the widest type supported by your ...
    (comp.lang.c)
  • Re: Statement on Schildt submitted to wikipedia today
    ... to working programmers and more with being "right all the time, ... so that compiler developers could be shed ... The major corporate interests were compiler developers, ... processors, committed to standard division semantics, and otherwise ...
    (comp.lang.c.moderated)
  • Re: #define and (brackets)
    ... Minor compiler vendors are free to join if they are so inclined, ... analysis hasn't changed between the two versions of the standard. ... This bug is a minor bug in an obscure ...
    (microsoft.public.vc.language)
  • Re: interesting use of NEXT SENTENCE vs. CONTINUE
    ... Program name in quotes (allowed in '02 Standard) ... > If J can be made an independent item which the compiler can put wherever it ... > has to be associated with a hardware device in SPECIAL-NAMES. ... > that ALTER *always* modifies the address parameter of the hardware branch ...
    (comp.lang.cobol)
  • Re: interesting use of NEXT SENTENCE vs. CONTINUE
    ... These days I don't do compiler maintenance, but I HAVE done in the past, so ... You had a chance to point out how adherence to the standard can improve ... >> compile it WITH MINOR MODIFICATIONS for a specific platform. ... > platform-specific extension to COBOL ...
    (comp.lang.cobol)