www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5762] New: getopt: short option parameter read incorrectly when bundling enabled

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

           Summary: getopt: short option parameter read incorrectly when
                    bundling enabled
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: epi atari8.info



Source:

import std.getopt;
import std.stdio;

void main(string args[])
{
    string str;
    getopt(args, config.bundling, "a|addr", &str);
    writeln(str);
}

Invoked with short (single-dash) option reads parameter incorrectly.
test.exe -a=-0x12
-= With double dash it's ok.
test.exe --a=-0x12
-0x12 Works also when bundling is disabled. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 21 2011