This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Fortran 2003 command line argument intrinsics (also fix Pr 15665).


On Tue, Jun 29, 2004 at 03:59:44PM +0300, Janne Blomqvist wrote:
> On Tue, Jun 29, 2004 at 03:44:49PM +0300, Janne Blomqvist wrote:
> > Hello,
> 
> Hello again,

Uh oh... ;-)

Please consider this patch instead of the previous one.

I fixed (?) Pr 15665, so now iargc() also works. A closer inspection
of the F2003 draft as well as some experimentation revealed that
command_argument_count() is not the same as iargc(), but rather
command_argument_count() = iargc() - 1. So it's now implemented as a
separate function, not as an alias.

The example program is also sligthly improved and provided for
completeness.

gcc Changelog:

	* intrinsic.c (add_functions): Add command_argument_count
	symbol. (add_subroutines): Add symbols for get_command and
	get_command_argument.
	PR fortran/15665
	* trans-intrinsic.c (gfc_conv_intrinsic_function): Handle
	GFC_ISYM_NONE.

libgfortran Changelog:

	* args.c: Modify comment in beginning of file. (iargc): Add
	void to argument list. (command_argument_count,
	get_command_argument, get_command):
	New functions.

-- 
Janne Blomqvist

Attachment: f2003args_2.patch
Description: Text document

Attachment: echo.f90
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]