TOML の3成分数値配列キーを読み込む。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(toml_table), | intent(inout) | :: | table | |||
| type(toml_key), | intent(in) | :: | key | |||
| real(kind=dp), | intent(out) | :: | value(3) | |||
| character(len=*), | intent(in) | :: | context |
subroutine get_toml_real3(table, key, value, context) type(toml_table), intent(inout) :: table type(toml_key), intent(in) :: key real(dp), intent(out) :: value(3) character(len=*), intent(in) :: context type(toml_array), pointer :: array integer :: i, stat nullify (array) call get_value(table, key, array, stat=stat) call require_toml_success(stat, context) if (.not. associated(array)) error stop 'Invalid TOML value for '//trim(context)//'.' if (toml_len(array) /= 3) then error stop trim(context)//' must be an array of 3 numbers.' end if do i = 1, 3 call get_value(array, i, value(i), stat=stat) call require_toml_success(stat, context) end do end subroutine get_toml_real3