--On 07 December 2004 10:11 -0500 Aleksandar Donev
<[log in to unmask]> wrote:
> 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?
Nasoftware's Fplus Fortran 95 compiler has had this as an extension for
years. This allows any intrinsic in initialisation expressions.
--
Dr. Lawrie Schonfelder
Honorary Senior Fellow, University of Liverpool
Home: 1 Marine Park, West Kirby, Wirral, UK, CH48 5HN
Phone: +44 (151) 625 6986
|