Does F90 do type checking when calling module subroutines?



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)
.



Relevant Pages

  • Re: Use of interface within module?
    ... Should the interface be used within the ... -| subroutine plot_a ... The interface block is required so that the compiler can ... -|so the module procedure statement suffices in this case. ...
    (comp.lang.fortran)
  • Re: Error message from random number generation
    ... The subroutine I've used is similar to ones I ... have used to sample from normal and uniform distributions, ... Have you turned on all compiler checks, ... Have you provided an interface, ...
    (comp.lang.fortran)
  • Re: generic interface question
    ... MODULE procedure foo1,foo2,foo3 ... SUBROUTINE foo2 ... Is that actually what the compiler says, ... INTERFACE odinit ...
    (comp.lang.fortran)
  • Re: Question about passing arrays to subroutines
    ... As long as there is no allocation or dealocation done *IN THE ... SUBROUTINE*, the fact that it is an allocatable array makes no ... One big caveat is that, in order for the compiler to know to do this, it ... an explicit interface helps the compiler ...
    (comp.lang.fortran)
  • Re: Help.. subroutines etc..
    ... and i cant find where i ve done mistake! ... You probably got some kind of compiler error message. ... Your subroutine is sitting in the middle of the main program. ... If you are using a compiler capable of at least f90, ...
    (comp.lang.fortran)