This returns ubound() for either a given aryEdgesInfoT variable (See Section 2.3) or pair of lbound and size.
interface getUbound function getUboundFromEdgesInfo(aryEdgesInfo) result(outUbound) type(AryEdgesInfoT), intent(in) :: aryEdgesInfo integer :: outUbound(aryEdgesInfo\%aryDimension) ! return end function getUboundFromEdgesInfo function getUboundFromScalars(inLbound, arySize) result(outUbound) integer, intent(in) :: inLbound(:), arySize(size(inLbound)) integer :: outUbound(size(inLbound)) ! return end function getUboundFromScalars end interface