www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16420] New: Incorrect example in std.getopt docs

https://issues.dlang.org/show_bug.cgi?id=16420

          Issue ID: 16420
           Summary: Incorrect example in std.getopt docs
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/phobos/std_getopt.html
                OS: All
            Status: NEW
          Severity: minor
          Priority: P3
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: kulhanek.5 wright.edu

The documentation for std.getopt includes the following example:
=================
bool foo, bar;
getopt(args,
    std.getopt.config.caseSensitive,
    "foo", &foo,
    "bar", &bar);

In the example above, "--foo", "--bar", "--FOo", "--bAr" etc. are recognized.
The directive is active til the end of getopt, or until the converse directive
caseInsensitive is encountered: 
=================

Presumably "recognized" was supposed to be "rejected".

--
Aug 23 2016