At 13:21 03-04-2000 +0100, you wrote:
>
>I was a bit surprised to find that our f90 compiler was not happy with the
>following:
>
> function test
> integer :: test
>
>I was puzzled why it is necessary to have instead:
>
> function test()
> integer :: test
>
>I was writting a module where I wanted all variables private and access
>functions to return the value. Hence functions with no arguments.
>
>The () on the function statement seem completely redundant so why have
>them? p112 on fortran90/95 explained appears to show them as required so
>it's obviously part of the standard.
>
>No big deal, I'm just curious.
>
The reason for having to use () is IMHO the fact that without these
a reference like
K = test
cannot be detected as a function call. Adding
EXTERNAL TEST
is not sufficient here.
---
Meilleures Salutations,
Best Greetings,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
Postbus 354
2600 AJ Delft
Netherlands / Pays-Bas
Phone: +31 15 278 50 17
Fax: +31 15 278 37 87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|