Print

Print


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.