On Wed, 3 Apr 2002, Richard Maine wrote:
<snip>
> So just use
>
> INTERFACE ASSIGNMENT (+)
> module procedure Complex_Add
> END INTERFACE
>
> and likewise for all the other cases.
<snip>
Hi Richard,
I was under the impression that addition could only be overloaded for a
derived type using
INTERFACE OPERATOR(+)
MODULE PROCEDURE ...
MODULE PROCEDURE ...
END INTERFACE
rather than ASSIGNMENT(=). I'm surprised you didn't catch that ;-).
I'm curious why the standards committee chose ASSIGNMENT for just the single
operator "=". I'd love to be able to define my own assignment operators, for
example .+=. .-=., etc.
Ted
--
Ted Stern Engineering Applications
Cray Inc. http://www.cray.com
411 First Avenue South, Suite 600 206-701-2182
Seattle, WA 98104-2860 FAX: 206-701-2500
gpg fingerprint = 6171 14B3 A323 965B 614D 056F B41C 03AE E404 986C
|