Find a free registry slot
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | private | :: | i |
function find_free_slot() result(slot) integer(int32) :: slot integer(int32) :: i slot = -1 do i = 1, MAX_ARRAYS if (.not. registry(i)%active) then slot = i exit end if end do if (slot < 0) then error stop "darrays: no free registry slots" end if end function find_free_slot