Hello,
I have a question about argument SIZE schecking in procedures with
interfaces. Say I have:
INTERFACE
SUBROUTINE Test(x,y)
REAL, DIMENSION(:) :: x
REAL, DIMENSION(SIZE(x)) :: y
END SUBROUTINE Test
END INTERFACE
Is the Fortran 95 compiler obliged to check whether x and y have actual
matching sizes during compile time? Say I call:
CALL Test(x(1:5),y(1:1))
Should this be a compile error?
My Lahey lf95 does not seem to do this, it only checks the SHAPE's of
the arguments. Maybe this is because of compatibility with Fortran 77
where one could pass things any way it pleased.
Thanks,
Aleksandar
--
_____________________________________________
Aleksandar Donev
[log in to unmask]
Physics Department
Michigan State University
East Lansing, MI 48825
(517) 432-6770
_____________________________________________
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|