Argument list class
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(argument), | public, | allocatable | :: | argv(:) |
Array of arguments in this list |
||
integer, | public | :: | nargs | = | 0 |
Number of arguments |
|
character(len=:), | public, | allocatable | :: | prog |
Name of the invoked executable, if available |
Constructor for the argument list
Constructor of the argument list
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
procedure(argument_count_interface), | optional | :: | argument_counter |
Argument counter interface |
||
procedure(get_argument_interface), | optional | :: | argument_getter |
Argument getter interface |
Newly created argument list
Get command line argument
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(argument_list), | intent(in) | :: | self | |||
integer, | intent(in) | :: | idx | |||
character(len=:), | intent(out), | allocatable | :: | arg |
Display debug information on this instance
Display debug information on an argument list instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(argument_list), | intent(in) | :: | self |
Instance of the argument list |
||
integer, | intent(in) | :: | unit |
Formatted unit for output |
Append a command line argument
Append a string to the argument list
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(argument_list), | intent(inout) | :: | self |
Instance of the argument list |
||
character(len=*), | intent(in) | :: | string |
String representing the argument |
type :: argument_list !> Name of the invoked executable, if available character(len=:), allocatable :: prog !> Number of arguments integer :: nargs = 0 !> Array of arguments in this list type(argument), allocatable :: argv(:) contains !> Append a command line argument procedure :: push_back !> Display debug information on this instance procedure :: info !> Get command line argument procedure :: get end type argument_list