Re: getopt helpWanted

2015-04-30 Thread wobbles via Digitalmars-d-learn
On Wednesday, 29 April 2015 at 22:02:29 UTC, novice2 wrote: Hello. Help me please to understand, how to show usage help to user, who enter wrong options? For example, user not provided required filename. I want to show error message, and program usage help text. But likely getopt don't

Re: getopt helpWanted

2015-04-30 Thread novice2 via Digitalmars-d-learn
Thank you, Brian!

getopt helpWanted

2015-04-29 Thread novice2 via Digitalmars-d-learn
Hello. Help me please to understand, how to show usage help to user, who enter wrong options? For example, user not provided required filename. I want to show error message, and program usage help text. But likely getopt don't provide help text until valid options will be parsed. Reduced

Re: getopt helpWanted

2015-04-29 Thread Brian Schott via Digitalmars-d-learn
What you're trying to do is currently impossible. I filed a bug (https://issues.dlang.org/show_bug.cgi?id=14525) because what you're trying to do really should be possible. import std.stdio : writefln; import std.getopt; void main(string[] args) { string fname; try {