| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=ip), | intent(in), | dimension(NSTATE) | :: | state | ||
| integer(kind=ip), | intent(out) | :: | idx |
index of the element in the queue |
subroutine add_to_queue(state, idx) integer(ip),dimension(NSTATE),intent(in) :: state integer(ip),intent(out) :: idx !! index of the element in the queue if (allocated(queue)) then call expand_queue(queue,queue_size,item(state = state)) idx = queue_size else queue = [item(state = state)] queue_size = 1 idx = 1 end if end subroutine add_to_queue