On 2015-01-25 at 11:42, Tobias Pankrath wrote:
On Sunday, 25 January 2015 at 10:21:34 UTC, Suliman wrote:
But is it good practice to fail with exception during passing unknown
parameters? Maybe std.getopt.config.passThrough should be as default?
I really can't remember Apps that crush if pass
On Sunday, 25 January 2015 at 10:21:34 UTC, Suliman wrote:
But is it good practice to fail with exception during passing
unknown parameters? Maybe std.getopt.config.passThrough should
be as default?
I really can't remember Apps that crush if pass to in unknown
parameters.
Almost all program
But is it good practice to fail with exception during passing
unknown parameters? Maybe std.getopt.config.passThrough should be
as default?
I really can't remember Apps that crush if pass to in unknown
parameters.
On Sun, 25 Jan 2015 05:34:15 +, Suliman wrote:
> Ali, you are right it's my error:
>
> getopt(
>args,
>
> and I did:
> args.getopt (
> args,
>
>
> Am I right understand that "args" in "args.getopt" is UFCS syntax style?
just a minor detail: "UFCS style", as "S" un "UFCS" means "syntax
On Sun, 25 Jan 2015 05:34:15 +, Suliman wrote:
> Ali, you are right it's my error:
>
> getopt(
>args,
>
> and I did:
> args.getopt (
> args,
>
>
> Am I right understand that "args" in "args.getopt" is UFCS syntax style?
exactly.
signature.asc
Description: PGP signature
Ali, you are right it's my error:
getopt(
args,
and I did:
args.getopt
(
args,
Am I right understand that "args" in "args.getopt" is UFCS syntax
style?
On 01/24/2015 11:39 AM, Suliman wrote:
> First of all it's seems bug in docs:
> void main(string[] args)
> {
>getopt(
> args,
> "length", &length,// numeric
> "file",&data, // string
> "verbose", &verbose, // flag
> "color", &color);// enum
>
On Sat, 24 Jan 2015 19:55:10 +, Suliman wrote:
>> Look for "Passing unrecognized options through" in the documentation.
> Oh I see, but first part of question is still actual.
>
> And also what is benefits of using getopt instead of parsing args[]
> manually?
well... you can skip writing cus
Look for "Passing unrecognized options through" in the
documentation.
Oh I see, but first part of question is still actual.
And also what is benefits of using getopt instead of parsing
args[] manually?
http://dlang.org/phobos/std_getopt.html
But problem that I do not know how handle not existing values:
void main(string[] args)
{
args.getopt
(
"help", &help
);
}
app.exe -sss
causes crash:
std.getopt.GetOptException@C:\D\dmd2\windows\bin\..\..\src\phobos
First of all it's seems bug in docs:
void main(string[] args)
{
getopt(
args,
"length", &length,// numeric
"file",&data, // string
"verbose", &verbose, // flag
"color", &color);// enum
...
}
with args inside getopt I am getting:
C:\D\dmd2\windows\bin\
11 matches
Mail list logo