[Issue 9344] A program takes a console comand as an argument.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 18 02:36:55 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9344


Iain Buclaw <ibuclaw at ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at ubuntu.com


--- Comment #2 from Iain Buclaw <ibuclaw at ubuntu.com> 2013-01-18 02:36:22 PST ---
(In reply to comment #1)
> (In reply to comment #0)
> > import std.stdio;
> > 
> > int main(char[][] p_Args) 
> > { 
> >  foreach(char[] l_Arg; p_Args)
> >  {
> >    writefln("Argument '%s'", l_Arg);
> >  }
> >  return 0;
> > }
> > 
> > /+
> > Input and output example:
> > 
> > $ ./a.out MY NAME HERE
> > Argument './a.out'
> > Argument 'MY'
> > Argument 'NAME'
> > Argument 'HERE'
> > 
> > On Ubuntu 12.10 compiled with gdc,the version that can be found on its
> > repositories.
> > +/
> 
> Sorry, what is the problem? As far as I see, the input/output example works as
> expected.
> 
> The `main` function always receive the command string by p_Args[0]. It is same
> as C/C++ behavior.


Yep, not a bug, not even a feature request.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list