module states use typedef, only: & int64 implicit none integer(kind=int64), parameter :: & STATUS_UNKNOWN = -1, & STATUS_OK = 0, & STATUS_COLLIDE = 1, & STATUS_ESCAPE = 2, & STATUS_INTERACT = 3 character(len=8), dimension(-1:3), parameter :: & STATUS_NAMES = (/ & 'UNKNOWN ', & 'OK ', & 'COLLIDE ', & 'ESCAPE ', & 'INTERACT' /) save integer(kind=int64) :: & status = STATUS_OK integer(kind=int64), dimension(2) :: & status_stars = (/0, 0/) contains ! ====================================================================== subroutine get_status(status_, status_stars_) use typedef, only: & int64 implicit none integer(kind=int64), intent(out) :: & status_ integer(kind=int64), dimension(2), intent(out) :: & status_stars_ status_ = status status_stars_ = status_stars end subroutine get_status ! ====================================================================== subroutine reset_status implicit none status = STATUS_OK status_stars = (/0, 0/) end subroutine reset_status ! ====================================================================== end module states