prog_args - Gemini67/Celma GitHub Wiki

celma::prog_args

The largest sub-library within Celma provides easy and feature-rich program argument handling. It only takes 2 lines of code for a program that does not support any arguments, or just the usual help arguments, and then just one additional line per additional argument. The main point is: When you call the function to handle the program arguments, and it returns without error, everything is done:

  • Values are converted, if necessary, and assigned to their corresponding destination variables.
  • Values have been checked against the provided, allowed values.
  • All mandatory arguments were set, otherwise the error handling would have occurred.
  • All arguments constraints were checked successfully.