Re: getopt Basic usage

2020-08-15 Thread James Gray via Digitalmars-d-learn
On Saturday, 15 August 2020 at 04:39:58 UTC, mw wrote: On Saturday, 15 August 2020 at 04:09:19 UTC, James Gray wrote: I am trying to use getopt and would not like the program to throw an unhandled exception when parsing command line options. Is the following, adapted from the first example in

Re: getopt Basic usage

2020-08-15 Thread James Gray via Digitalmars-d-learn
On Saturday, 15 August 2020 at 09:48:26 UTC, MoonlightSentinel wrote: On Saturday, 15 August 2020 at 04:09:19 UTC, James Gray wrote: I am trying to use getopt and would not like the program to throw an unhandled exception when parsing command line options. Try passing config.passThrough, it

Re: getopt Basic usage

2020-08-15 Thread James Gray via Digitalmars-d-learn
On Saturday, 15 August 2020 at 17:04:17 UTC, Jon Degenhardt wrote: On Saturday, 15 August 2020 at 04:09:19 UTC, James Gray wrote: I am trying to use getopt and would not like the program to throw an unhandled exception when parsing command line options. Is the following, adapted from the first

Re: getopt Basic usage

2020-08-15 Thread Jon Degenhardt via Digitalmars-d-learn
On Saturday, 15 August 2020 at 04:09:19 UTC, James Gray wrote: I am trying to use getopt and would not like the program to throw an unhandled exception when parsing command line options. Is the following, adapted from the first example in the getopt documentation, a reasonable approach? I

Re: getopt Basic usage

2020-08-15 Thread MoonlightSentinel via Digitalmars-d-learn
On Saturday, 15 August 2020 at 04:09:19 UTC, James Gray wrote: I am trying to use getopt and would not like the program to throw an unhandled exception when parsing command line options. Try passing config.passThrough, it should disable the exception for unknown arguments.

Re: getopt Basic usage

2020-08-14 Thread mw via Digitalmars-d-learn
On Saturday, 15 August 2020 at 04:09:19 UTC, James Gray wrote: I am trying to use getopt and would not like the program to throw an unhandled exception when parsing command line options. Is the following, adapted from the first example in the getopt documentation, a reasonable approach? life

getopt Basic usage

2020-08-14 Thread James Gray via Digitalmars-d-learn
I am trying to use getopt and would not like the program to throw an unhandled exception when parsing command line options. Is the following, adapted from the first example in the getopt documentation, a reasonable approach? import std.getopt; string data = "file.dat"; int length = 24; bool