dc_args::dcargshelpmsg Interface Reference

Private Member Functions

subroutine dcargshelpmsg0 (arg, category, msg)
 

Detailed Description

Definition at line 251 of file dc_args.f90.

Member Function/Subroutine Documentation

◆ dcargshelpmsg0()

subroutine dc_args::dcargshelpmsg::dcargshelpmsg0 ( type(args), intent(inout)  arg,
character(*), intent(in)  category,
character(*), intent(in)  msg 
)
private

Definition at line 663 of file dc_args.f90.

663  !
664  ! ヘルプメッセージを追加します.
665  !
666  ! サブルーチン DCArgsHelp を使用した際に出力されるメッセージを
667  ! 付加します. *category* に +Title+, +Overview+, +Usage+ が
668  ! 指定されたものは +Options+ よりも上部に,
669  ! それ以外のものは下部に表示されます.
670  ! *msg* にはメッセージを与えてください.
671  !
672  !=== 例
673  !
674  ! program dc_args_sample3
675  ! use dc_types
676  ! use dc_string, only: StoA
677  ! use dc_args
678  ! implicit none
679  ! type(ARGS) :: arg
680  ! logical :: OPT_namelist
681  ! character(STRING) :: VAL_namelist
682  ! character(STRING), pointer :: argv(:) => null()
683  ! integer :: i
684  !
685  ! call DCArgsOpen( arg = arg ) ! (out)
686  ! call DCArgsHelpMsg( arg = arg, & ! (inout)
687  ! & category = 'Title', & ! (in)
688  ! & msg = 'dcargs $Revision: 1.2 $ ' // &
689  ! & ':: Test program of dc_args' ) ! (in)
690  ! call DCArgsHelpMsg( arg = arg, & ! (inout)
691  ! & category = 'Usage', & ! (in)
692  ! & msg = 'dcargs [Options] arg1, arg2, ...') ! (in)
693  ! call DCArgsOption( arg = arg, & ! (inout)
694  ! & options = StoA('-N', '--namelist'), & ! (in)
695  ! & flag = OPT_namelist, & ! (out)
696  ! & value = VAL_namelist, & ! (out)
697  ! & help = "Namelist filename") ! (in)
698  ! call DCArgsHelpMsg( arg = arg, & ! (inout)
699  ! & category = 'DESCRIPTION', & ! (in)
700  ! & msg = '(1) Define type "HASH". ' // &
701  ! & '(2) Open the variable. ' // &
702  ! & '(3) set HelpMsg. ' // &
703  ! & '(4) set Options. ' // &
704  ! & '(5) call Debug. ' // &
705  ! & '(6) call Help. ' // &
706  ! & '(7) call Strict.') ! (in)
707  ! call DCArgsHelpMsg( arg = arg, & ! (inout)
708  ! & category = 'Copyright', & ! (in)
709  ! & msg = 'Copyright (C) ' // &
710  ! & 'GFD Dennou Club, 2008. All rights reserved.') ! (in)
711  ! call DCArgsDebug( arg = arg ) ! (inout)
712  ! call DCArgsHelp( arg = arg ) ! (inout)
713  ! call DCArgsStrict( arg = arg ) ! (inout)
714  ! call DCArgsGet( arg = arg, & ! (inout)
715  ! & argv = argv ) ! (out)
716  ! write(*,*) '--namelist=', trim( VAL_namelist )
717  ! do i = 1, size(argv)
718  ! write(*,*) argv(i)
719  ! end do
720  ! deallocate( argv )
721  ! call DCArgsClose( arg = arg ) ! (inout)
722  ! program dc_args_sample3
723  !
724  ! コマンドライン引数に '-h', '-H', '--help' のいづれかのオプション
725  ! を指定することで, HelpMsg で与えたメッセージと, オプションの一覧
726  ! が標準出力に表示されます.
727  !
728  use dc_hash, only: dchashput
729  use dc_string, only: uchar
730  use dc_message, only: messagenotify
731  implicit none
732  type(args), intent(inout) :: arg
733  character(*), intent(in) :: category
734  character(*), intent(in) :: msg
735  character(len = *), parameter :: subname = 'DCArgsHelpMsg'
736  continue
737  if (.not. arg % initialized) then
738  call messagenotify('W', subname, 'Call Open before Help in dc_args.')
739  call dcargsopen(arg)
740  end if
741  call dchashput(arg % helpmsg, key=uchar(category), value=msg)
文字型変数の操作.
Definition: dc_string.f90:24

The documentation for this interface was generated from the following file: