Does Fortran 2003 implementation of deferred bound procedure requires same argument?

痴心易碎 提交于 2019-12-06 03:52:39

A specific binding in an extension that overrides a specific binding in the parent type must have dummy arguments that match in name and characteristics, bar the type of the passed argument, if any. This is explained in the F2008 standard in section 4.5.7.3 (similar words in F2003).

The compiler is therefore correct to complain. Remember that the name of a dummy argument can be used when the procedure is referenced, and may also be used in the PASS attribute for the binding. A mismatch in argument names doesn't make sense in those contexts.

With respect to you last paragraph it is not clear to me exactly what you want, or how that relates to the previous part of the question. However, note that components can be allocatable. Each object of type with an allocatable component could have the component allocated to a different size. Similarly, while dummy arguments in bound procedures must have matching characteristics, and a characteristic of a dummy argument is its shape, that shape could be assumed shape.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!