find_free_slot Function

private function find_free_slot() result(slot)

Find a free registry slot

Arguments

None

Return Value integer(kind=int32)


Called by

proc~~find_free_slot~~CalledByGraph proc~find_free_slot find_free_slot proc~darray_create_dp darray_create_dp proc~darray_create_dp->proc~find_free_slot proc~darray_create_i32 darray_create_i32 proc~darray_create_i32->proc~find_free_slot proc~darray_create_i64 darray_create_i64 proc~darray_create_i64->proc~find_free_slot proc~darray_create_sp darray_create_sp proc~darray_create_sp->proc~find_free_slot interface~darray_create darray_create interface~darray_create->proc~darray_create_dp interface~darray_create->proc~darray_create_i32 interface~darray_create->proc~darray_create_i64 interface~darray_create->proc~darray_create_sp

Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private :: i

Source Code

   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