-
Notifications
You must be signed in to change notification settings - Fork 34
CLI Method is_defined_group
Stefano Zaghi edited this page Mar 23, 2016
·
1 revision
Signature
is_defined = cli%is_defined_group(group, g)
Inquire if a CLAs group (a command) has been defined into the CLI.
character(*), intent(in) :: group !< Name of group (command) of CLA.
integer(I4P), optional, intent(out) :: g !< Index of group.
Note that this is not a pure function, it has a side effect: the optional argument g
, if passed, returns the number of the group (command) named group
. Such a feature is intended to be used internally rather than from the final user, because the array of groups (commands) is not publicly accessible.
Must be used for inquiring if a CLAs group (command) has been defined into the CLI
use flap
type(command_line_interface):: cli
logical:: is_defined
call cli%init(...)
call cli%add(...)
call cli%parse(...)
is_defined = cli%is_defined_group(group='commit')
if (is_defined) then
! do your job with commit command, e.g. check if it has been actually passed...
endif
Home | About | Getting Started Guide | Usage | Copyright © 2016 szaghi