at Function
private function at(this, idx)
Arguments
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(vector_ref), | intent(in) | :: | this | |||
integer, | intent(in) | :: | idx |
Return Value class(*), pointer
Source Code
function at(this, idx)
class(vector_ref), intent(in) :: this
integer, intent(in) :: idx
class(*), pointer :: at
at => null()
if(1 <= idx .and. idx <= this%current_size) then
at => this%items(idx)%stuff
end if
end function at