std.getopt in 2.047

Stanislav Blinov blinov at loniir.ru
Tue Aug 10 09:38:28 PDT 2010


  Hello,

I've noticed that documentation does not reflect what std.getopt does 
concerning endOfOptions ("--").

Documentation:

Options Terminator

A lonesome double-dash terminates getopt gathering. It is used to 
separate program options from other parameters (e.g. options to be 
passed to another program). Invoking the example above with "--foo -- 
--bar" parses foo but leaves "--bar" in args. The double-dash itself is 
removed from the argument array.

---

But the double-dash is not removed. I've encountered this while testing 
a small program, but then looked at std.getopt.d, and indeed 
handleOption just breaks on endOfOptions without removing it. Is this a 
documentation error or Phobos bug?

-- 

	**

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20100810/4d61ee52/attachment.html>


More information about the Digitalmars-d-learn mailing list