using iargc()/getarg() form C
Satish Balay
balay@fastmail.fm
Tue Feb 22 19:24:00 GMT 2005
On Tue, 22 Feb 2005, Satish Balay wrote:
> It appears that gfortran now has support for iargc()/getarg() from
> fortran [by name transofrmation]. However Some mixed language codes
> that support fortran - use these functions from C.
>
> Is there a plan to provide the above symbols as well?
> getarg_() -> _gfortran_getarg_i4()
> iargc_() -> _gfortran_iargc()
According to http://gcc.gnu.org/ml/fortran/2005-02/msg00141.html
command_argument_count() and get_command_argument() are the correct
things to use.
How about providing the appropriate names as well instead of the
modified ones? so this standard defined versions are easily detected
and used from C as well?
command_argument_count__ -> _gfortran_get_command_argument_i4
get_command_argument__ -> _gfortran_get_command_i4
thanks,
Satish
-------
[balay@localhost junk]$ nm -o /usr/lib/gcc/i386-redhat-linux/4.0.0/libgfortranpreview.a | grep command
nm: bessel.o: no symbols
nm: c99_functions.o: no symbols
nm: erf.o: no symbols
/usr/lib/gcc/i386-redhat-linux/4.0.0/libgfortranpreview.a:args.o:000000ee T _gfortran_get_command_argument_i4
/usr/lib/gcc/i386-redhat-linux/4.0.0/libgfortranpreview.a:args.o:00000210 T _gfortran_get_command_argument_i8
/usr/lib/gcc/i386-redhat-linux/4.0.0/libgfortranpreview.a:args.o:0000026e T _gfortran_get_command_i4
/usr/lib/gcc/i386-redhat-linux/4.0.0/libgfortranpreview.a:args.o:000003a6 T _gfortran_get_command_i8
/usr/lib/gcc/i386-redhat-linux/4.0.0/libgfortranpreview.a:args.o:000000ee T _gfortrani_get_command_argument_i4
/usr/lib/gcc/i386-redhat-linux/4.0.0/libgfortranpreview.a:args.o:0000026e T _gfortrani_get_command_i4
[balay@localhost junk]$
More information about the Fortran
mailing list