digitalmars.D.bugs - [Issue 9344] New: A program takes a console comand as an argument.
- d-bugmail puremagic.com (35/35) Jan 17 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9344
- d-bugmail puremagic.com (10/33) Jan 17 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9344
- d-bugmail puremagic.com (11/41) Jan 18 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9344
- d-bugmail puremagic.com (10/10) Jan 18 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9344
http://d.puremagic.com/issues/show_bug.cgi?id=9344 Summary: A program takes a console comand as an argument. Product: D Version: D2 Platform: x86 OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: yolkati gmail.com 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. +/ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 17 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9344import 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. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 17 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9344 Iain Buclaw <ibuclaw ubuntu.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuclaw ubuntu.comYep, 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: -------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.
Jan 18 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9344 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |INVALID -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 18 2013