Re: getarg and iargc in gcc-4.0.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Germund,

The following works with gfortran

[prt@localhost svn]# cat demo.f90
program test_arg
 character(80) :: buffer
 narg = iargc ()
 print *, "no. of args = ", narg
 do i = 1, narg
   call getarg (i, buffer)
   print *, buffer
 end do
end program test_arg

[prt@localhost svn]# ./a.out my arg your arg
no. of args =            4
my
arg
your
arg

Whilst not standard (as using -std=f95 will demonstrate), this is a fairly common manifestation of argument reading in fortran.

Regards

Paul Thomas


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux