Re: gfortran question about optional subroutine arguments

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

 



On 3/14/2013 8:30 AM, Tobias Burnus wrote:
Mark Hounschell wrote:



c    the old fortran77 call would have been
c    call sub1(arg1,)

Hmm, I have not seen the ",)" syntax before. I assume that that is some vendor extension, where the compiler does something - or a typo and it should be "arg1)" without ",".


I think I recall something like this from long before the f77 days. With certain compilers, this resembled optional argument, although it may have passed a machine zero value (and reserved a safe slot for discarding a returned value). Certainly, there is no way for -std=legacy to know which prehistoric compiler you wish to emulate. g77 had a variety of optional argument scheme which worked differently from this, but I don't think anyone made a case for continuing it in gfortran. f90 requires a compiler to complain about such non-standard usage, and to use explicit interface for optional arguments.

--
Tim Prince



[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