getopt Basic usage

James Gray test at test.com
Sun Aug 16 02:11:31 UTC 2020


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 example in 
>> the getopt documentation, a reasonable approach?
>
> I use the approach you showed, except for writing errors to 
> stderr and returning an exit status. This has worked fine. An 
> example: 
> https://github.com/eBay/tsv-utils/blob/master/number-lines/src/tsv_utils/number-lines.d#L48

Thank you I will have a look at the link.


More information about the Digitalmars-d-learn mailing list