Construct a logical key, capturing the current target as default.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name | |||
| logical, | intent(in), | pointer | :: | tgt | ||
| character(len=*), | intent(in) | :: | doc | |||
| character(len=*), | intent(in), | optional | :: | units | ||
| logical, | intent(in), | optional | :: | required | ||
| character(len=*), | intent(in), | optional | :: | dead_on_ocean_path |
function nml_logical(name, tgt, doc, units, required, dead_on_ocean_path) result(key) !! Construct a logical key, capturing the current target as default. character(len=*), intent(in) :: name, doc logical, pointer, intent(in) :: tgt character(len=*), intent(in), optional :: units logical, intent(in), optional :: required character(len=*), intent(in), optional :: dead_on_ocean_path type(nml_logical_key_t) :: key key%name = name key%doc = doc key%units = "" if (present(units)) key%units = units if (present(required)) key%required = required key%dead_reason = "" if (present(dead_on_ocean_path)) key%dead_reason = dead_on_ocean_path key%tgt => tgt key%default = tgt end function nml_logical