Herbert Fruechtl wrote:
> No function that takes real
> arguments or returns a real result is allowed. I suspect that the
> reason is that you must be able to calculate it during compilation,
> and the compiler may not be able to do that
Note that this restriction has been lifted in Fortran 2003 (after a long
debate)---one can now use things like sqrt and log inside
initialization expressions.
The main difficulty is as you say the fact that the exact values depend
on the runtime environment, so things like cross-compilation, different
rounding settings, several versions of the libraries, etc., pose a
problem when you want to do one compilation only. I don't think any
compiler actually implements this yet?
Best,
Aleksandar
|