cla_show Subroutine

public subroutine cla_show()

Arguments

None

Calls

proc~~cla_show~~CallsGraph proc~cla_show cla_show proc~cla_get_char cla_get_char proc~cla_show->proc~cla_get_char proc~cla_key_present cla_key_present proc~cla_show->proc~cla_key_present proc~cla_message cla_message proc~cla_show->proc~cla_message proc~cla_get_char->proc~cla_show proc~cla_command_argument_count cla_command_argument_count proc~cla_get_char->proc~cla_command_argument_count proc~cla_get_command_argument cla_get_command_argument proc~cla_get_char->proc~cla_get_command_argument proc~cla_key_arg_match cla_key_arg_match proc~cla_get_char->proc~cla_key_arg_match proc~cla_str_eq cla_str_eq proc~cla_get_char->proc~cla_str_eq proc~cla_key_present->proc~cla_show proc~cla_key_present->proc~cla_command_argument_count proc~cla_fatal cla_fatal proc~cla_key_present->proc~cla_fatal proc~cla_key_present->proc~cla_get_command_argument proc~cla_key_present->proc~cla_key_arg_match proc~cla_key_arg_match->proc~cla_str_eq

Called by

proc~~cla_show~~CalledByGraph proc~cla_show cla_show proc~cla_get_char cla_get_char proc~cla_show->proc~cla_get_char proc~cla_key_present cla_key_present proc~cla_show->proc~cla_key_present proc~cla_get_char->proc~cla_show proc~cla_key_present->proc~cla_show interface~cla_get cla_get interface~cla_get->proc~cla_get_char proc~cla_get_float_r4 cla_get_float_r4 interface~cla_get->proc~cla_get_float_r4 proc~cla_get_float_r8 cla_get_float_r8 interface~cla_get->proc~cla_get_float_r8 proc~cla_get_int_i4 cla_get_int_i4 interface~cla_get->proc~cla_get_int_i4 proc~cla_get_int_i8 cla_get_int_i8 interface~cla_get->proc~cla_get_int_i8 proc~cla_get_logical cla_get_logical interface~cla_get->proc~cla_get_logical proc~cla_get_flag cla_get_flag proc~cla_get_flag->proc~cla_get_char proc~cla_get_float_r4->proc~cla_get_char proc~cla_get_float_r8->proc~cla_get_char proc~cla_get_int_i4->proc~cla_get_char proc~cla_get_int_i8->proc~cla_get_char proc~cla_get_logical->proc~cla_get_char proc~get_cla_gvec_to_jorek get_CLA_gvec_to_jorek proc~get_cla_gvec_to_jorek->proc~cla_key_present proc~get_cla_gvec_to_jorek->interface~cla_get program~gvec GVEC program~gvec->interface~cla_get

Source Code

    subroutine cla_show
      integer(kind=int_kind) :: i
      character(len=STRLEN)  :: value
      character(len=STRLEN)  :: i_str
      call cla_message('General usage:')
      call cla_message('  command -[key] [value] --[longkey] [value] -[flag] [positional arguments]')
      call cla_message('  The key/value pairs must be matched if they appear.')
      call cla_message('  Key/value pairs and flags may be in any order.')
      call cla_message(' ')
      call cla_message('The following command line arguments and switches are expected:')
      do i=1,cla_num
         write(i_str,'(i5)')i
         call cla_message('---------- i: '// trim(i_str))
         call cla_message('         key: '// trim(cla_registry(i)%key))
         call cla_message('     longkey: '// trim(cla_registry(i)%longkey))
         call cla_message(' description: '// trim(cla_registry(i)%description))
         call cla_message('        kind: '// &
                          trim(cla_kindstr(cla_registry(i)%kind)))
         call cla_message('     default: '// trim(cla_registry(i)%default))
      end do
      call cla_message(' ')
      call cla_message('The following positional (non-keyword) arguments are expected:')
      do i=1,cla_posarg_num
         write(i_str,'(i5)')i
         call cla_message('---------- i: '// trim(i_str))
         call cla_message('         key: '// trim(cla_posarg_registry(i)%key))
         call cla_message(' description: '// trim(cla_posarg_registry(i)%description))
         call cla_message('        kind: '// &
                          trim(cla_kindstr(cla_posarg_registry(i)%kind)))
         call cla_message('     default: '// trim(cla_posarg_registry(i)%default))
         if ( cla_key_present(trim(cla_registry(i)%key)) ) then
            call cla_get_char(trim(cla_registry(i)%key),value)
            call cla_message('    present?: T')
            if (cla_registry(i)%kind == cla_flag) then
            else
               call cla_message('       value: '// trim(value))
            endif
         else
            call cla_message('    present?: F')
         endif
      end do

      call cla_message(' ')
      call cla_message('Also, -?, -h, -H, -help, --help, and --usage are recognized.')
      call cla_message(' ')
    end subroutine cla_show