我正在使用派生類型編寫Fortran中的一些代碼並遇到問題,但仍無法弄清楚發生了什麼問題................... .................................................. .................................................. .................................................. .................................................. .................................................. .............使用派生類型時的Fortran錯誤
make -f vbld.mk gfortran -c gshapes.f08 gshapes.f08:100.31: generic, public :: get => get_ellipse, & 1 Error: Undefined specific binding 'get_ellipse_minmax' as target of GENERIC 'get' at (1) gshapes.f08:136.31: generic, public :: get => get_cylinder, & 1 Error: Undefined specific binding 'get_cylinder_minmax' as target of GENERIC 'get' at (1) gshapes.f08:139.15: procedure :: print => print_cylinder 1 Error: Dummy argument 'cyld' of 'print' at (1) should be named 'elips' as to match the corresponding argument of the overridden procedure gshapes.f08:135.15: procedure :: set => set_cylinder 1 Error: Dummy argument 'cyld' of 'set' at (1) should be named 'elips' as to match the corresponding argument of the overridden procedure gshapes.f08:74.31: generic, public :: get => get_rectangle, & 1 Error: Undefined specific binding 'get_rectangle_minmax' as target of GENERIC 'get' at (1) gshapes.f08:118.31: generic, public :: get => get_prism, & 1 Error: Undefined specific binding 'get_prism_minmax' as target of GENERIC 'get' at (1) gshapes.f08:121.15: procedure :: print => print_prism 1 Error: Dummy argument 'prsm' of 'print' at (1) should be named 'rect' as to match the corresponding argument of the overridden procedure gshapes.f08:117.15: procedure :: set => set_prism 1 Error: Dummy argument 'prsm' of 'set' at (1) should be named 'rect' as to match the corresponding argument of the overridden procedure make: *** [gshapes.mod] Error 1
顯示相關代碼。錯誤表明在類型綁定的泛型語句中有過程名稱,而不是特定的綁定名稱;以及特定結合覆蓋中的一些參數特徵不匹配。 – IanH 2013-05-01 02:00:26