Return a new (initiliazed) option instance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character, | intent(in), | optional | :: | option_name | Option name. |
|
character, | intent(in), | optional | :: | option_values | Option values. |
|
character, | intent(in), | optional | :: | option_comment | Option comment. |
New (initiliazed) option instance.
elemental function new_option(option_name, option_values, option_comment)
!< Return a new (initiliazed) option instance.
character(*), intent(in), optional :: option_name !< Option name.
character(*), intent(in), optional :: option_values !< Option values.
character(*), intent(in), optional :: option_comment !< Option comment.
type(option) :: new_option !< New (initiliazed) option instance.
if (present(option_name )) new_option%oname = option_name
if (present(option_values )) new_option%ovals = option_values
if (present(option_comment)) new_option%ocomm = option_comment
endfunction new_option