6 Nov. 2000
> Date: Mon, 06 Nov 2000 12:09:06 +0100
> From: Goeran Klose <[log in to unmask]>
> Hello again,
> I have one more specific question. We try to use PUBLIC and
> PRIVATE attributes for user defined operators (see the ".cross."
> operator in the example given below).
> Unfortunately our Fujitsu Compiler does not accept the syntax
> we use.
>
> =============================================================
> MODULE Vector__tools
> !!
> !! General modules for constants and portability
> !!
> ...
> !!
> IMPLICIT NONE
> !!
> PRIVATE
> !!
> !! Operator overloading for dot and cross products
> !!
> INTERFACE OPERATOR (.DOT.)
> MODULE PROCEDURE DotProduct
> END INTERFACE ! (.DOT.)
> !!
> INTERFACE OPERATOR (.CROSS.)
> MODULE PROCEDURE CrossProduct3D
> END INTERFACE ! (.CROSS.)
> !!
> PUBLIC :: .CROSS. !! line 38
The correct syntax is
PUBLIC :: OPERATOR (.CROSS.)
See "essential Fortran 90 and 95 (Meissner) p. 362
and
"Algorithms and Data Structures in F and Fortran" (Vowels) p. 190.
> !!
> CONTAINS
> ...
> END MODULE Vector__tools
> ===========================================================
> Our compiler generates the following error message.
> ===========================================================
> Fortran diagnostic messages: program
> name(Vector__tools)
> jwd1302i-s "Vector.f90", line 38: Missing name
> ===========================================================
>
> Does anybody know how to resolve this problem.
>
> Regards,
>
> Göran
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|