[mercury-users] getopt
Michael Day
mikeday at yeslogic.com
Tue Feb 25 11:25:20 AEDT 2003
> Unfortunately changing it to "multi" now would break any program using
> getopt. The breakage would be a kind that would be easy to fix, but
> it would be a bit of a pain.
I ended up needing to work around this in another way anyway, as if you
want your short_opts and long_opts predicates to be able to work backwards
to enumerate the available option chars then they need multiple modes, and
you can't take the address of a predicate with multiple modes, so you add
a wrapper predicate which solves both problems.
On the topic of getopt, when I create a boolean long option it appears to
return no by default and yes if --foo is present. However if --foo=bar or
--foo= is present it returns no and does not give an error message. Is
this correct behaviour? Shouldn't it complain that it is not expecting an
argument for that option?
Michael
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list