Skip to content

CLI Method add_group

Stefano Zaghi edited this page Mar 23, 2016 · 2 revisions

add_group

Signature

call cli%add_group(help, description, exclude, group)
Meaning

Add a new group of CLAs (a command) to CLI. All dummy arguments are optionals except group.

Dummy arguments
character(*), optional, intent(in) :: help        !< Help message.
character(*), optional, intent(in) :: description !< Detailed description.
character(*), optional, intent(in) :: exclude     !< Group name of the mutually exclusive group.
character(*),           intent(in) :: group       !< Name of the grouped CLAs.

The default values of them are:

help='usage: '
description=''
exclude=''

the examples array is not allocated by default.

Usage

Must be used for add a new group of CLAs (a command) to CLI (this is the direct method, an indirect one is embedded into the add method)

use flap

type(command_line_interface):: cli

call cli%init(...)
call cli%add_group(help="command usage: ",                      &
                   description="command for doing special task",&
                   exclude="second_command",                    &
                   group="first_command")

In the figure below a visual meaning of each dummy arguments is provided.

init

Clone this wiki locally