At 17:07 29-03-2004 +0100, John Reid wrote:
>Jan van Oosterwijk wrote:
>>Hello,
>>
>>At 00:39 30-03-2004 +1000, Robin wrote:
>>
>>> > Date: Sun, 28 Mar 2004 21:58:36 -0500
>>> > From: Jean Vezina <[log in to unmask]>
>>>
>>> > Here is another case that cause problems with some compilers:
>>> >
>>> > character*5 a
>>> > call test(a,'123')
>>> > print *,a
>>> > end
>>> > subroutine test(a,b)
>>> > ! the problem statement is the IMPLICIT
>>> > implicit character(*) (a-z)
>>> > a = b
>>> > end
>>> >
>>> > The problematic statement is the IMPLICIT CHARACTER(*). I think this
>>> > was prohibited in Fortran 77, but in Fortran 95 ?
>>>
>>>Should be OK.
>>>But what about an explicit interface etc?
>>
>>
>>I tried two compilers, who rejected the IMPLICIT statement.
>>Then I looked in the standard and found in 5.1.1.5 :
>>
>>" A character length parameter value of * may be used only in the
>>following ways:
>>" (1) ... to declare a dummy argument of a procedure, ...
>>" (2) ... to declare a named constant ...
>>" (3) In an external function, the name of the function result may be
>> specified with a character length parameter value of *; ... "
>>
>>What do the experts say about this ?
>
>No problem. Here, we have case (1).
>
>John Reid.
Well, I tried a third compiler, which also rejected the program,
giving me reason to conclude that all three tested by me,
interpret the above cited restriction as
allowing (*) in type declaration statements only.
John seems to extend the permitted use of (*) to the <type-spec> of an
IMPLICIT statement.
I venture to disagree with John Reid's larger interpretation.
He certainly is more expert in standard matters than I am, so
must I conclude that I have three compilers with the same bug ?
Waiting for the decision of the real experts...
\---
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/
|