compilation problem: undefined reference

Tobias Burnus burnus@net-b.de
Thu Aug 2 09:01:00 GMT 2007


ppanta wrote:
> reference can be easily workaround ...
> ==================================
>       ieeer = ieee_handler( "set", "all", %val(2) )                     
>                                                     1
> Error: Syntax error in argument list at (1)
>  In file AAmainRain.F:136
>       ieeer = ieee_handler( "set", "inexact", %val(1) )                 
>                                                            1
> Error: Syntax error in argument list at (1)
> ==================================
>   
Using %VAL() one passes the argument as value and not as reference;
while %VAL() is not part of the Fortran standards, several compilers
support it. gfortran supports it since 4.2.x which probably means that
you use an older version of gfortran.

(The standard (Fortran 2003) way of call-by-value is to use the VALUE
attribute, which is supported since GCC/gfortran 4.3.)

For %VAL, see:
http://gcc.gnu.org/onlinedocs/gfortran/Argument-list-functions.html

For 4.2.x and 4.3.x binaries see:
http://gcc.gnu.org/wiki/GFortranBinaries

Tobias



More information about the Fortran mailing list