Re: Does F90 do type checking when calling module subroutines?
- From: Richard E Maine <nospam@xxxxxxxxxxxxx>
- Date: Tue, 26 Apr 2005 07:37:08 -0700
In article <pan.2005.04.26.08.34.06.212774@xxxxxxxxxxxxxxxxxxxxxx>,
Neilen Marais <junkmail@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Now I have learnt that f90 by
> default makes an implicit function call if it can't find an interface. So
> misspelled function / subroutine calls only get caught at link time. Is
> this correct?
Yes, that is correct. That's what I was referring to when I said I
wished there were an equivalent to "implicit none" for interfaces.
You do tend to get an error from this at link time, though, so not all
is lost. It is just that compile time would be better and clearer. The
"link name" of a module procedure is different from that of an external
procedure - it has to be so because it is legal to have an external
procedure and a module procedure of the same name (and, in fact,
multiple module procedures of the same name in different modules). I
wouldn't advise having such an external procedure, but it is allowed, so
the compiler has to have a way to distinguish it.
Generally, you will see a "link name" of an external procedure will have
something like an underscore added to the end (details and fine points
vary), while the "link name" of a module procedure will have both the
module name and the procedure name conflated somehow.
--
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:
- Does F90 do type checking when calling module subroutines?
- From: Neilen Marais
- Re: Does F90 do type checking when calling module subroutines?
- From: Richard E Maine
- Re: Does F90 do type checking when calling module subroutines?
- From: Neilen Marais
- Does F90 do type checking when calling module subroutines?
- Prev by Date: Re: Array with unknown number of dimensions
- Next by Date: Re: mixing logical with real in equation
- Previous by thread: Re: Does F90 do type checking when calling module subroutines?
- Next by thread: Re: Does F90 do type checking when calling module subroutines?
- Index(es):
Relevant Pages
|