A quick question or two concerning the definition of new operators
in F90. There are certainly other ways to tackle this problem
that I know will work but I was curious to see if I could
do it via overloaded operators.
I tried to code something like an "i++" operator, but ran up
against the constraint that the input to any user-defined operator
has to be strictly intent(in). So, the value of the input argument
is never changed and i++ doesn't work. Is there any way around this?
And, a small syntax question. See the code below. Is the
'USE MISC_UTILITY, ONLY: .PP' syntax ok? The compiler complains
that .PP. hasn't been declared as a user-defined operator.
I'm using the SGI 7.4 compilers which have had problems with
USE XXX statements before.
MODULE MISC_UTILITY
INTERFACE OPERATOR (.PP.)
MODULE PROCEDURE ADD1
END INTERFACE
.....
END MODULE MISC_UTILITY
SUBROUTINE X (..... )
USE MISC_UTILITY, ONLY: .PP. ! doesn't compile
USE MISC_UTILITY ! compiles
END SUBROUTINE X
Catherine
--
-------------------------------------------------------------------------
Catherine Moroney phone : (818) 393-3392
Jet Propulsion Laboratory fax : (818) 393-4802
MailStop 169-315 email : [log in to unmask]
4800 Oak Grove Drive
Pasadena, CA 91109-8099
|