histpop_fn Function

private function histpop_fn(this)

Type Bound

history_stack_t

Arguments

Type IntentOptional Attributes Name
class(history_stack_t) :: this

Return Value type(vec4)


Source Code

    type(vec4) function histpop_fn(this)
        
        class(history_stack_t) :: this

        if(this%size == 0 .or. .not. allocated(this%data))then
            histpop_fn = vec4(-99._wp, -99._wp, -99._wp, -99._wp)
            return
        end if
        
        histpop_fn = this%data(this%size)
        this%size = this%size - 1

    end function histpop_fn