简体   繁体   English

有没有像Fortran编译器这样的东西?

[英]There is no such thing as a Fortran compiler?

One of my professors told me last night that "there is no such thing as a Fortran compiler" and that when one compiles Fortran what actually happens is that it is converted to C and then it is compiled in C. 我的一位教授昨晚告诉我,“没有Fortran编译器之类的东西”,当编译Fortran时,实际上发生的是将其转换为C,然后在C中进行编译。

This seems a little off to me as Fortran was invented in 1957 and C in 1972. Does he mean modern Fortran compilers used today such as GNU and Intel? 对于我来说,这似乎有点离谱,因为Fortran于1957年发明,C于1972年发明。他是否意味着今天使用的现代Fortran编译器,例如GNU和Intel?

There are plenty of Fortran compilers that don't use C as an intermediate representation. 有很多不使用C作为中间表示形式的Fortran编译器。 Some examples are the compilers from Intel and Portland Group, and the gnu compiler gfortran. 例如,英特尔和波特兰集团的编译器,以及gnu编译器gfortran。 The NAG Fortran compiler converts to C and then compiles that (I'm pretty sure this is still true), and early on before the first "true" gnu Fortran compiler you had to use f2c (long, long deprecated), but these are the only such case I've come across in almost 3 decades of using Fortran. NAG Fortran编译器将转换为C,然后进行编译(我很确定这仍然是正确的),并且在第一个“真正的” gnu Fortran编译器的早期,您必须使用f2c(长时不推荐使用),但是这些是在使用Fortran的近3年中,我遇到过唯一这样的情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM