output_format_list Module


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: max_formats = 4

Functions

public pure function ext_for_format(token) result(ext)

Canonical file extension for a format token.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: token

Return Value character(len=4)

public function derived_filename(base, token, n_formats) result(fname)

Derive the output filename for token. One format -> base verbatim; many formats -> stem (a trailing known extension stripped) + canonical ext.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: base
character(len=*), intent(in) :: token
integer, intent(in) :: n_formats

Return Value character(len=:), allocatable


Subroutines

public subroutine parse_format_list(spec, allowed, tokens, n, is_ok, message)

Split spec on spaces/commas into deduped tokens validated against allowed. Assumes spec is already lowercased by the config layer.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: spec
character(len=*), intent(in) :: allowed(:)
character(len=8), intent(out) :: tokens(max_formats)
integer, intent(out) :: n
logical, intent(out) :: is_ok
character(len=*), intent(out) :: message