开发者

problem converting fortran file containing MODULE

I am converting a Fortran file using f2c. The file contains the definition of a MODULE, and I am unable to convert it. The error is Error on line 1 of machine.f: unclassifiable statement (starts "modulemach")

The file is pasted below:

MODULE MACHINE
IMPLICIT NONE
SAVE

! Machine dependant constants
integer, parameter :: kind_io4  = 4, kind_io8  = 8 , kind_ior = 8
&,                    kind_evod = 8, kind_dbl_prec = 8
&,                    kind_rad  = selected_real_kind(13,60) !the '60' maps to 64-bit real
&,                    kind_phys = selected_real_kind(13,60) ! the '60' map开发者_开发问答s to 64-bit real
&,                    kind_REAL = 8                         ! used in cmp_comm
&,                    kind_INTEGER = 4                      ! -,,-
real(kind=kind_evod), parameter :: mprec = 1.e-12 ! machine precision to restrict dep
END MODULE MACHINE

Any help will be appreciated!

Thanks


I've used f2c on a few occasions only, and don't have much experience with it, but isn't it a tool for converting Fortran 77 code to C?

Modules are a Fortran feature that were introduced in Fortran 90, and they are not part of Fortran 77 (along with portable precision, e.g. KIND and some other stuff), and I don't know if C has an analog for those features. Somebody will surely clarify me on that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜