At 11:31 22-09-2004 -0700, Catherine Moroney wrote:
[ ... ]
>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.
>
>USE MISC_UTILITY, ONLY: .PP. ! doesn't compile
! Syntax should be
USE MISC_UTILITY, ONLY: operator( .PP. )
But even with this correction my Absoft compiler (V 7.5 Win)
complains that:
cf90-732 error on line 16 of oper.f95: "PP" is not in module "MISC_UTILITY".
Removing the ONLY makes the associated function vailable and
compiler is satisfied.
MODULE MISC_UTILITY
INTERFACE OPERATOR (.PP.)
MODULE PROCEDURE ADD1
END INTERFACE
contains
integer function add1(a) ! This is not the I++ !!
integer, intent(IN) :: a
add1 = a + 1
end function
END MODULE MISC_UTILITY
SUBROUTINE X ( )
USE MISC_UTILITY, ONLY: operator(.PP.) ! Absoft doesn't compile
integer :: xx = 3
print *, .pp. xx
END SUBROUTINE X
! Now this works on Salford :-)
call x
end
\---
Best regards,
Jan van Oosterwijk | "They that can give up essential liberty
Netherlands | to obtain a little temporary safety deserve
| neither liberty nor safety."
| -- Benjamin Franklin (1759)
write(*,*)transfer((/778985834,1869504886,1702130543,1785296754 &
&,1635205227,1868849518,1819160175 /),(/'x'/)) ; end
mailto:Jan <dot> vanOosterwijk <at> wanadoo <dot> NL
http://huizen <dot> dto <dot> tudelft <dot> nl/vanOosterwijk/
|