Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is the "sense" of a command line option?

I am reading the documentation for glib’s CLI option parser and I’m very confused about one of their option flags.

G_OPTION_FLAG_REVERSE
For options of the G_OPTION_ARG_NONE kind, this flag indicates that the sense of the option is reversed.

What does this mean? What is the "sense" of an option"?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If an option does not take an argument, it can be considered boolean. The option is usually considered ‘true’ if present, or ‘false’ if absent. Those interpretations can be reversed, and that changes the sense of the option.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading