Print

Print


Aleksandar Donev wrote:

> Intel's compiler gives an error for the following function because it
> does not assign a return result:
>
> function test(x)
>     write(*,*) "error!"
>     stop
> end function test
>
> Is this kind of compiler behavior allowed? If yes, why should a silly
> compiler be allowed to play so smart (it should of course give a
> warning)...

actually, the silly compiler is completely correct - the function
result *must* be assigned (or otherwise given a value), even if the
silly function is just going to print a msg and stop

-John Turner
 LANL, CCS-2