flap_test_choices_logical.f90 Source File

Test FLAP for bad usage of choices option with logical


This file depends on

sourcefile~~flap_test_choices_logical.f90~~EfferentGraph sourcefile~flap_test_choices_logical.f90 flap_test_choices_logical.f90 sourcefile~flap.f90 flap.f90 sourcefile~flap_test_choices_logical.f90->sourcefile~flap.f90 sourcefile~flap_command_line_argument_t.f90 flap_command_line_argument_t.F90 sourcefile~flap.f90->sourcefile~flap_command_line_argument_t.f90 sourcefile~flap_command_line_arguments_group_t.f90 flap_command_line_arguments_group_t.f90 sourcefile~flap.f90->sourcefile~flap_command_line_arguments_group_t.f90 sourcefile~flap_command_line_interface_t.f90 flap_command_line_interface_t.F90 sourcefile~flap.f90->sourcefile~flap_command_line_interface_t.f90 sourcefile~face.f90 face.F90 sourcefile~flap_command_line_argument_t.f90->sourcefile~face.f90 sourcefile~flap_object_t.f90 flap_object_t.F90 sourcefile~flap_command_line_argument_t.f90->sourcefile~flap_object_t.f90 sourcefile~flap_utils_m.f90 flap_utils_m.f90 sourcefile~flap_command_line_argument_t.f90->sourcefile~flap_utils_m.f90 sourcefile~flap_command_line_arguments_group_t.f90->sourcefile~flap_command_line_argument_t.f90 sourcefile~flap_command_line_arguments_group_t.f90->sourcefile~face.f90 sourcefile~flap_command_line_arguments_group_t.f90->sourcefile~flap_object_t.f90 sourcefile~flap_command_line_interface_t.f90->sourcefile~flap_command_line_argument_t.f90 sourcefile~flap_command_line_interface_t.f90->sourcefile~flap_command_line_arguments_group_t.f90 sourcefile~flap_command_line_interface_t.f90->sourcefile~face.f90 sourcefile~flap_command_line_interface_t.f90->sourcefile~flap_object_t.f90 sourcefile~flap_command_line_interface_t.f90->sourcefile~flap_utils_m.f90

Source Code

!< Test FLAP for bad usage of choices option with logical
program flap_test_choices_logical
!< Test FLAP for bad usage of choices option with logical
use flap, only : command_line_interface
use penf

implicit none
type(command_line_interface) :: cli   !< Command Line Interface (CLI).
logical                      :: vbval !< Valued-boolean value.
integer(I4P)                 :: error !< Error trapping flag.

call cli%init(progname='test_choices_logical')
call cli%add(switch='--boolean-value', switch_ab='-bv', help='A help message', &
             required=.false., def='.false.', choices='.True.,.False.', act='store', error=error)
call cli%parse(error=error)
call cli%get(switch='-bv', val=vbval, error=error)
print "(A)", "Error code: "//trim(str(error, .true.))
endprogram flap_test_choices_logical