entry_t Derived Type

type, private :: entry_t

One declared option, flag or positional.


Inherits

type~~entry_t~~InheritsGraph type~entry_t entry_t type~string_type string_type type~entry_t->type~string_type name, short, help, value, default

Inherited by

type~~entry_t~~InheritedByGraph type~entry_t entry_t type~cli_t cli_t type~cli_t->type~entry_t entries

Components

Type Visibility Attributes Name Initial
type(string_type), private :: 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.

type(string_type), private :: help

One-line description, for help_text.

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.


Source Code

   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