Does F90 do type checking when calling module subroutines?
- From: Neilen Marais <junkmail@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Apr 2005 22:03:31 +0200
Hi
I was under the impression that if you call subroutines from modules, f90
would check the call paramter types? I'm using Intel fortran under linux.
I have a subroutine defined in a module like this:
MODULE parseinput
..
..
..
INTERFACE read_namelists
MODULE PROCEDURE read_namelists
END INTERFACE
..
..
..
CONTAINS
SUBROUTINE read_namelists(infile)
IMPLICIT NONE
INTEGER(I4B), INTENT(in) :: infile
In another .f90 file, I included this subroutine with a USE parseinput
statement. Then I erroneously proceed to call it with a character array
(i.e. string) as parameter instead of an integer. Yet I get no compiler
error or warning! Is this the expected behaviour? If it is, is there
any way I can convince the compiler to let me know of my evil ways?
BTW, I4B is just an alias defined to mean 4 byte integer.
Thanks
Neilen
--
you know its kind of tragic
we live in the new world
but we've lost the magic
-- Battery 9 (www.battery9.co.za)
.
- Follow-Ups:
- Re: Does F90 do type checking when calling module subroutines?
- From: Steve Lionel
- Re: Does F90 do type checking when calling module subroutines?
- From: Ken Fairfield
- Re: Does F90 do type checking when calling module subroutines?
- From: Richard E Maine
- Re: Does F90 do type checking when calling module subroutines?
- Prev by Date: Re: mixing logical with real in equation
- Next by Date: Re: mixing logical with real in equation
- Previous by thread: mixing logical with real in equation
- Next by thread: Re: Does F90 do type checking when calling module subroutines?
- Index(es):
Relevant Pages
|