well i found a way around this. you have to use the "interface" structure. do something like this:
interface doubledot
function doubledot(a,b)
real, dimension(3,3) :: a, b
real, dimension(3,3,3,3) :: doubledot
end function doubledot
end interface
thanks for the help though!