FORTRAN Generic Operator (^)

I am implementing the cross product of two vectors using ^, however I am getting an error.Not aware how the problem can be resolved.

Here is the code

Interface Operator (^)
  Module Procedure vector_cross_product
End Interface Operator (^)

Contains

Function vector_cross_product (u, v) Result (w)

  !!$ Input
  Type (Vector), Intent(in) :: u, v

  !!$ Output
  Type (Vector) :: w

  w% x = (u% y * v% z) - (u% z * v% y)
  w% y = (u% z * v% x) - (u% x * v% z)
  w% z = (u% x * v% y) - (u% y * v% x)

End Function vector_cross_product

This is the corresponding errer I am getting using gfortran

Interface Operator (^)
                    1
Error: Syntax error in generic specification at (1)
lib/vectors.f:110.18:

  Module Procedure vector_cross_product
                  1
Error: MODULE PROCEDURE at (1) must be in a generic module interface
lib/vectors.f:111.3:

End Interface Operator (^)
   1
Error: Expecting END MODULE statement at (1)

Hi.

For your code on:

OS, ker|rel, machine: Linux, 2.6.26-2-amd64, x86_64
Distribution        : Debian 5.0.8 (lenny, workstation) 
ifort (IFORT) 11.1 20090827

The Intel Fortran compiler says:

$ ifort -c t.f90 
t.f90(1): error #5078: Unrecognized token '^' skipped
Interface Operator (^)
--------------------^
t.f90(1): error #5082: Syntax error, found ')' when expecting one of: * .NOT. + . - /) ** / // .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...

Looks like it wants something from that list (presumably the standard operators) rather than "^", although I don't know if "..." is meant literally. Perhaps ".X." would work.

Good luck ... cheers, drl

---------- Post updated at 13:56 ---------- Previous update was at 12:23 ----------

Hi.

-- Math 60 -- Chapter 9

Best wishes ... cheers, drl