Close a unit previously opened by one of the open helpers.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=default_int), | intent(in) | :: | unit |
Unit to close. |
||
| type(error_t), | intent(inout) | :: | err |
Error state, |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=default_int), | private | :: | ios |
subroutine serialize_close(unit, err) !! Close a unit previously opened by one of the open helpers. integer(default_int), intent(in) :: unit !! Unit to close. type(error_t), intent(inout) :: err !! Error state, `ERROR_IO` if the close failed. integer(default_int) :: ios close (unit, iostat=ios) call check_io(ios, "failed to close serialized stream", err) end subroutine serialize_close