admin管理员组文章数量:1434371
I've defined an n-element array Then, depending on the fulfillment or not of some conditions, some of those elements are given a value. Some not. Is there a fortran function that returns the number of array elements that have been given a value? Suppose that the function in question is called nelements. Then,
integer*4 i
dimension i(50)
i(1) = 7
i(2) = 15
write(6,*)"number of array elements that have been given a value ", nelements(i)
end
would render 2 since only 2 elements of the array i have been defined. Is there a function like that in fortran, or a workaround ?
本文标签: fortranFunction that evaluates number of array elements that have been given a valueStack Overflow
版权声明:本文标题:fortran - Function that evaluates number of array elements that have been given a value - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745596781a2665529.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论