\hypertarget{interfacedc__args_1_1dcargshelp}{}\section{dc\+\_\+args\+:\+:dcargshelp Interface Reference}
\label{interfacedc__args_1_1dcargshelp}\index{dc\+\_\+args\+::dcargshelp@{dc\+\_\+args\+::dcargshelp}}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
subroutine \hyperlink{interfacedc__args_1_1dcargshelp_af7b821cb2fbf1ecc7d6823c349b76d5e}{dcargshelp0} (arg, force)
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 247 of file dc\+\_\+args.\+f90.



\subsection{Member Function/\+Subroutine Documentation}
\mbox{\Hypertarget{interfacedc__args_1_1dcargshelp_af7b821cb2fbf1ecc7d6823c349b76d5e}\label{interfacedc__args_1_1dcargshelp_af7b821cb2fbf1ecc7d6823c349b76d5e}} 
\index{dc\+\_\+args\+::dcargshelp@{dc\+\_\+args\+::dcargshelp}!dcargshelp0@{dcargshelp0}}
\index{dcargshelp0@{dcargshelp0}!dc\+\_\+args\+::dcargshelp@{dc\+\_\+args\+::dcargshelp}}
\subsubsection{\texorpdfstring{dcargshelp0()}{dcargshelp0()}}
{\footnotesize\ttfamily subroutine dc\+\_\+args\+::dcargshelp\+::dcargshelp0 (\begin{DoxyParamCaption}\item[{type(\hyperlink{structdc__args_1_1args}{args}), intent(inout)}]{arg,  }\item[{logical, intent(in), optional}]{force }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Definition at line 556 of file dc\+\_\+args.\+f90.


\begin{DoxyCode}
556     \textcolor{comment}{!}
557     \textcolor{comment}{! ヘルプオプションの自動設定を行います. }
558     \textcolor{comment}{!}
559     \textcolor{comment}{! -h, -H, --help のいづれかが指定された際, 自動的に *arg* 内に設定された}
560     \textcolor{comment}{! 情報をヘルプメッセージとして表示した後, プログラムを終了させます.}
561     \textcolor{comment}{! 原則的に, このサブルーチンよりも前に DCArgsOption, DCArgsDebug }
562     \textcolor{comment}{! のサブルーチンを呼んで下さい.}
563     \textcolor{comment}{!}
564     \textcolor{comment}{! *force* に .true. が指定される場合, -H, --help オプションが与え}
565     \textcolor{comment}{! られない場合でもヘルプメッセージを表示した後, プログラムを終了さ}
566     \textcolor{comment}{! せます.}
567     \textcolor{comment}{!}
568     \textcolor{comment}{! ヘルプメッセージに表示される情報は, DCArgsOption, DCArgsHelpMsg}
569     \textcolor{comment}{! サブルーチンによって付加することが可能です.}
570     \textcolor{comment}{!}
571     \textcolor{keywordtype}{use }\hyperlink{namespacedc__types}{dc\_types}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__types_adb76910ff05e3b9fe3436567f8f8dac6}{string}, \hyperlink{namespacedc__types_a5d5ccca8cc2b447f2a0546da0a22efdc}{stdout}
572     \textcolor{keywordtype}{use }\hyperlink{namespacedc__string}{dc\_string}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__string_1_1stoa}{stoa}, \hyperlink{interfacedc__string_1_1stoi}{stoi}, \hyperlink{interfacedc__string_1_1printf}{printf}, \hyperlink{interfacedc__string_1_1concat}{concat}, 
      \hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}, \hyperlink{interfacedc__string_1_1uchar}{uchar}, \hyperlink{interfacedc__string_1_1lchar}{lchar}
573     \textcolor{keywordtype}{use }\hyperlink{namespacedc__present}{dc\_present}\textcolor{keywordtype}{, only}: \hyperlink{namespacedc__present_ab280582985ee69fda00e2a0bf09194af}{present\_and\_true}
574     \textcolor{keywordtype}{use }\hyperlink{namespacedc__message}{dc\_message}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}
575     \textcolor{keywordtype}{use }\hyperlink{namespacedc__hash}{dc\_hash}\textcolor{keywordtype}{, only}: \hyperlink{interfacedc__hash_1_1dchashget}{dchashget}, \hyperlink{interfacedc__hash_1_1dchashdelete}{dchashdelete}, 
      \hyperlink{interfacedc__hash_1_1dchashrewind}{dchashrewind}, \hyperlink{interfacedc__hash_1_1dchashnext}{dchashnext}
576     \textcolor{keywordtype}{implicit none}
577     \textcolor{keywordtype}{type}(args), \textcolor{keywordtype}{intent(inout)} :: arg
578     \textcolor{keywordtype}{logical}, \textcolor{keywordtype}{intent(in)}, \textcolor{keywordtype}{optional} :: force
579     \textcolor{keywordtype}{logical} :: opt\_help, found, end
580     \textcolor{keywordtype}{character(STRING)} :: val\_help, options\_msg, help\_msg, category
581     \textcolor{keywordtype}{character(STRING)}, \textcolor{keywordtype}{pointer} :: localopts(:) => null()
582     \textcolor{keywordtype}{integer} :: unit, i
583     \textcolor{keywordtype}{character(len = *)}, \textcolor{keywordtype}{parameter}  :: subname = \textcolor{stringliteral}{'DCArgsHelp'}
584   \textcolor{keywordflow}{continue}
585     \textcolor{keywordflow}{if} (.not. arg % initialized) \textcolor{keywordflow}{then}
586       \textcolor{keyword}{call }\hyperlink{interfacedc__message_1_1messagenotify}{messagenotify}(\textcolor{stringliteral}{'W'}, subname, \textcolor{stringliteral}{'Call Open before Help in dc\_args.'})
587       \textcolor{keyword}{call }dcargsopen(arg)
588 \textcolor{keywordflow}{    end if}
589     \textcolor{keyword}{call }dcargsoption(arg, \hyperlink{interfacedc__string_1_1stoa}{stoa}(\textcolor{stringliteral}{'-h'}, \textcolor{stringliteral}{'-H'}, \textcolor{stringliteral}{'--help'}), opt\_help, val\_help, &
590       & help=\textcolor{stringliteral}{"display this help and exit. "} // &
591       & \textcolor{stringliteral}{"VAL is unit number (default is standard output)"})
592     \textcolor{keywordflow}{if} (.not. opt\_help .and. .not. \hyperlink{namespacedc__present_ab280582985ee69fda00e2a0bf09194af}{present\_and\_true}(force)) \textcolor{keywordflow}{then}
593       \textcolor{keywordflow}{return}
594 \textcolor{keywordflow}{    end if}
595     \textcolor{keywordflow}{if} (trim(val\_help) == \textcolor{stringliteral}{''}) \textcolor{keywordflow}{then}
596       unit = \hyperlink{namespacedc__types_a5d5ccca8cc2b447f2a0546da0a22efdc}{stdout}
597     \textcolor{keywordflow}{else}
598       unit = \hyperlink{interfacedc__string_1_1stoi}{stoi}(val\_help)
599 \textcolor{keywordflow}{    end if}
600 
601     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{''})
602 
603     \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashget}{dchashget}(arg % helpmsg, \textcolor{stringliteral}{'TITLE'}, help\_msg, found)
604     \textcolor{keywordflow}{if} (found) \textcolor{keywordflow}{then}
605       \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{'%c'}, c1=trim(help\_msg))
606       \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{''})
607       \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashdelete}{dchashdelete}(arg % helpmsg, \textcolor{stringliteral}{'TITLE'})
608 \textcolor{keywordflow}{    end if}
609 
610     \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashget}{dchashget}(arg % helpmsg, \textcolor{stringliteral}{'OVERVIEW'}, help\_msg, found)
611     \textcolor{keywordflow}{if} (found) \textcolor{keywordflow}{then}
612       \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{'Overview::'})
613       \textcolor{keyword}{call }printautolinefeed(unit, help\_msg, indent=\textcolor{stringliteral}{'     '})
614       \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{''})
615       \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashdelete}{dchashdelete}(arg % helpmsg, \textcolor{stringliteral}{'OVERVIEW'})
616 \textcolor{keywordflow}{    end if}
617 
618     \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashget}{dchashget}(arg % helpmsg, \textcolor{stringliteral}{'USAGE'}, help\_msg, found)
619     \textcolor{keywordflow}{if} (found) \textcolor{keywordflow}{then}
620       \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{'Usage::'})
621       \textcolor{keyword}{call }printautolinefeed(unit, help\_msg, indent=\textcolor{stringliteral}{'     '})
622       \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{''})
623       \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashdelete}{dchashdelete}(arg % helpmsg, \textcolor{stringliteral}{'USAGE'})
624 \textcolor{keywordflow}{    end if}
625 
626     \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{'Options::'})
627     \textcolor{keywordflow}{if} ( \textcolor{keyword}{associated}(arg % opt\_table) ) \textcolor{keywordflow}{then}
628       \textcolor{keywordflow}{do} i = 1, \textcolor{keyword}{size}(arg % opt\_table)
629         options\_msg = \textcolor{stringliteral}{' '}
630         \textcolor{keywordflow}{if} (arg % opt\_table(i) % optvalue\_flag) \textcolor{keywordflow}{then}
631           \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1concat}{concat}(arg % opt\_table(i) % options, \textcolor{stringliteral}{'=VAL'}, localopts)
632         \textcolor{keywordflow}{else}
633           \textcolor{keyword}{allocate}(localopts(\textcolor{keyword}{size}(arg % opt\_table(i) % options)))
634           localopts = arg % opt\_table(i) % options
635 \textcolor{keywordflow}{        end if}
636         options\_msg = trim(options\_msg) // trim(\hyperlink{namespacedc__string_a20412554f8f648165d202319119cf628}{joinchar}(localopts))
637         \textcolor{keyword}{deallocate}(localopts)
638         \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{' %c'}, c1=trim(options\_msg))
639         \textcolor{keyword}{call }printautolinefeed(unit, &
640           & arg % opt\_table(i) % help\_message, indent=\textcolor{stringliteral}{'     '})
641         \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{''})
642 \textcolor{keywordflow}{      end do}
643 \textcolor{keywordflow}{    end if}
644 
645     \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashrewind}{dchashrewind}(arg % helpmsg)
646     \textcolor{keywordflow}{do}
647       \textcolor{keyword}{call }\hyperlink{interfacedc__hash_1_1dchashnext}{dchashnext}(arg % helpmsg, category, help\_msg, end)
648       \textcolor{keywordflow}{if} (end) \textcolor{keywordflow}{exit}
649 
650       \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{'%c%c::'}, &
651         & c1=trim(\hyperlink{interfacedc__string_1_1uchar}{uchar}(category(1:1))), c2=trim(\hyperlink{interfacedc__string_1_1lchar}{lchar}(category(2:))))
652       \textcolor{keyword}{call }printautolinefeed(unit, help\_msg, indent=\textcolor{stringliteral}{'     '})
653       \textcolor{keyword}{call }\hyperlink{interfacedc__string_1_1printf}{printf}(unit, \textcolor{stringliteral}{''})
654 
655 \textcolor{keywordflow}{    enddo}
656 
657     \textcolor{keyword}{call }dcargsclose(arg)
658 
659     stop
\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
dc\+\_\+utils/\hyperlink{dc__args_8f90}{dc\+\_\+args.\+f90}\end{DoxyCompactItemize}
