'explicit' / 'fixed_current' / 'neutral_return' を enum へ写す。未知の値は unknown。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | closure |
pure integer(i32) function surface_charge_closure_id(closure) result(id) character(len=*), intent(in) :: closure select case (trim(lower_ascii(closure))) case ('explicit') id = surface_charge_closure_explicit case ('fixed_current') id = surface_charge_closure_fixed_current case ('neutral_return') id = surface_charge_closure_neutral_return case default id = surface_charge_closure_unknown end select end function surface_charge_closure_id