| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=ip), | intent(in), | dimension(NSTATE) | :: | state |
index in the queue. -1 if not present
function index_in_queue(state) result(idx) integer(ip),dimension(NSTATE),intent(in) :: state integer(ip) :: idx !! index in the queue. -1 if not present integer :: i idx = -1 if (.not. allocated(queue)) error stop 'error: queue not allocated' do i = 1, size(queue) if (all(state == queue(i)%state)) then idx = i return end if end do end function index_in_queue