FTN_Getopt
Fortran command line processing
|
Data Types | |
type | opt_t |
Class opt_t. More... | |
interface | optval |
Generic interface optval(type(opt_t) option, <type> value, integer stat) More... | |
Functions/Subroutines | |
impure elemental type(opt_t) function, public | optinit (name, type, short_name, stat) |
Procedure optinit. More... | |
elemental logical function, public | optset (option) |
Procedure optset. More... | |
elemental integer function, public | optind (option) |
Procedure optind. More... | |
integer function, public | optlen (option) |
Procedure optlen. More... | |
subroutine | optval_logical (option, value, stat) |
Specific procedure of optval. More... | |
subroutine | optval_integer (option, value, stat) |
Specific procedure of optval. More... | |
subroutine | optval_real (option, value, stat) |
Specific procedure of optval. More... | |
subroutine | optval_string (option, value, stat) |
Specific procedure of optval. More... | |
impure elemental subroutine, public | optarg (option, stat) |
Procedure optarg. More... | |
Variables | |
integer, parameter | stat_success = 0 |
private More... | |
integer, parameter | stat_alloc_fail = 1 |
private More... | |
integer, parameter | stat_type_unsupp = 2 |
private More... | |
integer, parameter | stat_type_mismatch = 3 |
private More... | |
integer, parameter | stat_arg_fail = 4 |
private More... | |
integer, parameter | stat_option_undef = 5 |
private More... | |
logical, dimension(:), allocatable, public, protected | optignored |
Unprocessed options. More... | |
impure elemental subroutine, public ftn_getopt::optarg | ( | type(opt_t), intent(inout) | option, |
integer, intent(out), optional | stat | ||
) |
Procedure optarg.
process command line and store the result in supplied option if it is encountered.
elemental integer function, public ftn_getopt::optind | ( | type(opt_t), intent(in) | option | ) |
Procedure optind.
Determine position of option on command line (-1 if not set).
impure elemental type(opt_t) function, public ftn_getopt::optinit | ( | character(len=*), intent(in) | name, |
character(len=*), intent(in) | type, | ||
character(len=1), intent(in), optional | short_name, | ||
integer, intent(out), optional | stat | ||
) |
Procedure optinit.
Initialize an opt_t object by specifying its name and type. By default, the long option style is supported, but a short option name can be optionally added. A blank or empty string for the short option is equivalent to omission.
[in] | type | must be one of the values 'integer', 'logical', 'real' or 'string'. |
integer function, public ftn_getopt::optlen | ( | type(opt_t), intent(in) | option | ) |
Procedure optlen.
Determine the length of a string type option. Zero is returned if the option is not set or of a different type.
elemental logical function, public ftn_getopt::optset | ( | type(opt_t), intent(in) | option | ) |
Procedure optset.
Determine whether option has been set. This is useful after an optarg call, because the program-specified type might be inconsistent with what was supplied on the command line.
|
private |
Specific procedure of optval.
|
private |
Specific procedure of optval.
|
private |
Specific procedure of optval.
|
private |
Specific procedure of optval.
logical, dimension(:), allocatable, public, protected ftn_getopt::optignored |
Unprocessed options.
This variable is available after the first call to optarg.
|
private |
private
|
private |
private
|
private |
private
|
private |
private
|
private |
private
|
private |
private