getopt: How does arraySep work?

Steven Schveighoffer schveiguy at
Tue Jul 14 14:22:57 UTC 2020

On 7/14/20 10:05 AM, Steven Schveighoffer wrote:

> Hm... that looks like it IS actually expecting to do what Andre wants. 
> It's adding each successive parameter.
> If that doesn't work, then there's something wrong with the logic that 
> decides whether a parameter is part of the previous argument or not.
> Please file a bug.

Belay that, the behavior is as designed, I think the issue is the 

If arraySep is "", then it's not "separation by whitespace", but rather 
you must repeat the parameter and each one is appended to the array:

dmd -run sample.d --modelicalibs a --modelicalibs b

If you want to specify all the parameters in one, you have to provide an 

The documentation needs updating, it should say "parameters are added 
sequentially" or something like that, instead of "separation by whitespace".


More information about the Digitalmars-d-learn mailing list