実行時設定ファイルの読み込みパスを決定する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(out) | :: | path |
読み込む設定ファイルパス(未検出時は空文字)。 |
||
| logical, | intent(out) | :: | found |
設定ファイルが解決できた場合に |
subroutine resolve_config_path(path, found) character(len=*), intent(out) :: path logical, intent(out) :: found logical :: has_primary character(len=*), parameter :: primary_config = 'beach.toml' path = '' found = .false. if (command_argument_count() >= 1) then call get_command_argument(1, path) if (len_trim(path) == 0) error stop 'Config path argument is empty.' found = .true. return end if inquire (file=primary_config, exist=has_primary) if (has_primary) then path = primary_config found = .true. end if end subroutine resolve_config_path