One declared option, flag or positional.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(string_type), | private | :: | default |
The declared default, kept so that a second |
|||
| type(string_type), | private | :: | help |
One-line description, for |
|||
| integer(kind=default_int), | private | :: | kind | = | KIND_OPTION |
One of the KIND_* codes. |
|
| type(string_type), | private | :: | name |
Long name, without the leading dashes. |
|||
| logical, | private | :: | required | = | .false. |
Whether a missing positional is an error. |
|
| integer(kind=default_int), | private | :: | seen | = | 0_default_int |
How many times this entry appeared on the command line. |
|
| type(string_type), | private | :: | short |
Single-character short name, or empty if there is none. |
|||
| type(string_type), | private | :: | value |
Current value: the default until parsing overwrites it. |
type :: entry_t !! One declared option, flag or positional. private type(string_type) :: name !! Long name, without the leading dashes. type(string_type) :: short !! Single-character short name, or empty if there is none. type(string_type) :: help !! One-line description, for `help_text`. type(string_type) :: value !! Current value: the default until parsing overwrites it. type(string_type) :: default !! The declared default, kept so that a second `parse_args` can put !! `value` back. Without it a re-parse silently inherits the previous !! run's values. integer(default_int) :: kind = KIND_OPTION !! One of the KIND_* codes. logical :: required = .false. !! Whether a missing positional is an error. integer(default_int) :: seen = 0_default_int !! How many times this entry appeared on the command line. end type entry_t