| 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 queue = [queue, item(state = state)] idx = size(queue) else queue = [item(state = state)] idx = 1 end if end subroutine add_to_queue