Re: why doesn't this compile ?
- From: Richard E Maine <nospam@xxxxxxxxxxxxx>
- Date: Wed, 27 Apr 2005 15:11:40 -0700
In article <1114635172.915844@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Bart Vandewoestyne <MyFirstName.MyLastName@xxxxxxxxxx> wrote:
> I am cleaning up my directory with test and example programs, and I came
> across the following testprogram that I've written somewhere in the past:
>
> http://www.cs.kuleuven.ac.be/~bartv/downloads/test_array_arguments.f95
>
> I guess I wanted to demonstrate to myself how to write a function that
> can act on arrays of both rank 1 and rank 2, but unfortunately this
> thing doesn't compile anymore.
Looks fine to me. And it compiles and runs fine with both compilers that
I just tried (Nag and g95). This suggests a compiler problem.
I'll note, as an aside, that I find the description of it as "a
function" to be slightly misleading. It is 2 different functions that
have the same generic name. Yes, it "looks" sort of like a single
function to the caller, which is a nice feature of generics, but on
still has to actually write the 2 functions (which can do entirely
unrelated things, though that would be a bad idea for clarity).
To me an elemental function would be "a function that can act on arrays
of both rank 1 and rank 2". (Though elementals are very restrictive -
the applications in this sample wouldn't fit in the elemental mold at
all).
--
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
.
- Follow-Ups:
- Re: why doesn't this compile ?
- From: beliavsky
- Re: why doesn't this compile ?
- References:
- why doesn't this compile ?
- From: Bart Vandewoestyne
- why doesn't this compile ?
- Prev by Date: Re: Detect EOF for direct access, unformatted files?
- Next by Date: 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
|