Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(chain), | intent(in) | :: | this | |||
integer, | intent(in), | optional | :: | dimen |
integer pure function get_length_chain(this, dimen)
class(chain), intent(in) :: this
integer, intent(in), optional :: dimen
if (present(dimen)) then
if (dimen > 1) then
get_length_chain = 1
else
get_length_chain = this%length
end if
else
get_length_chain = this%length
end if
end function get_length_chain