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
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
Code:
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)
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.
Quote:
Interfaces may also be used to define new unary or binary operators by referring to separately written functions. In such a case, the initial line is:
INTERFACE OPERATOR ( .op_abbrev. )
where .op_abbrev. is a character string (surrounded by periods) that will be used as a symbol for the new operator (by being placed before or between appropriate variables or constants). For further information, see section 16.3.
Need assistance in Fortran Compiler
I need to install Fortran compiler on Linux distribution . I don't have root access to use rpm or yum to install compiler . Is there any way I can get it ?
Are there any sites that has fortran compiler . Any links to download and install . (10 Replies)
Hi,
I have a requirement wherein i need to have a generic file watcher in place.
On presence of a file in a particular directory,the file watcher should identify the related config file and execute the series of the shell scripts mentioned in the config file.
eg.Config file
a.sh
b.sh... (7 Replies)
can we copy higher version aclocal to our software.
Is there any good book for automake,aclocal.m4,configure.sub,configure.guess that explains clearly about how they are related , how to modify them etc
Thanks
Gopi (1 Reply)
Can anyone recommend a very good Fortran online course for unix. It should also cover Fortran X11 programming if possible. I understand this learning cannot be rushed but a course that addresses useful topics sooner is best. If it isn't free, that's okay. (1 Reply)
Hello,
I have a FORTRAN code that I want to compile using F90 compiler. However,
when I enter the command:
f90 ./code.f -o ./code.out
It would give me prompt saying that absoft license has failed, or something.
I remember, however, that I could enter some keyword that ends with 'soft'
in... (1 Reply)
How do I update, change, reconfigure or whatever it is that I have to do, in order to rid the GENERIC label. It just means that it is the basic kernel shipped with the OS right? Im using FBSD 4.5 (2 Replies)