如何将代码从 Fortran77 转换为 Visual Fortran?
我需要将代码从 Fortran77 转换为 Compaq Visual Fortran。 是否可以? 如果“是”:是否还可以将结果保存为可以在 EXCEL 2003 中导入的表格?
I need to convert a code from Fortran77 to Compaq Visual Fortran.
Is it possible?
If "yes": is it also possible to save the results in a form that can be imported in EXCEL 2003?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
CVF 是 Fortran 95 编译器,而 Fortran 77 或多或少是 F95 的子集,所以是的,这当然是可能的。 您的实际问题是什么,或者您到底想做什么?
是的,您当然可以以 Excel 可以导入的格式输出数据。
另请注意,CVF 多年前已停产。
CVF is a Fortran 95 compiler, and Fortran 77 is more or less a subset of F95, so yes, it's certainly possible. What are your actual problems, or what exactly are you trying to do?
And yes, you can certainly output data in a format that excel can import.
Also note that CVF was discontinued many years ago.
Fortran 标准有多种; Fortran77、90、95、2003 和 2008 即将推出。 “Visual fortran”不是一个标准名称,而纯粹是康柏(现在是英特尔)编译器系列的商业名称。 由于他们添加了 IDE,因此将其命名为“Visual”。
由于 fortran 是向后兼容的,因此 fortran77 成为 fortran90 标准的子集(也就是说,fortran90 包括整个 f77 标准)。 F95 是对标准的一点扩展,保持了向后兼容性。
因此,除了尝试“现代化”代码语法本身之外,无需更改任何内容。 由于我见过的大多数 f77 代码都运行非常高效,因此我很少看到需要重写。
康柏的编译器是该行的一部分:
微软 Fortran Powerstation 1.0 --> 那么 4.0 --> 数字版本 5 --> Compaq 和现在 Intel 的 Visual Fortran 目前版本为 11。
它是一个相对稳定且高质量的编译器系列,深受 Fortran 用户欢迎。
关于最后一个问题,MS Excel可以通过导入读取文本文件,可以用fortran编写。 如果您正在考虑直接编写 .xls 文件,到目前为止我还没有看到可以做到这一点的库(如果您知道的话,请向我提供链接)。
There are several fortran standards; fortran77, 90, 95, 2003 and 2008 coming on. "Visual fortran" is not a standard's name, but purely a commercial name for Compaq's (and now Intel's) line of compilers. Since they added an IDE, they named it "Visual".
Since fortran is backwards compatible, fortran77 was made a subset of fortran90 standard (meaning, fortran90 includes the whole f77 standard). F95 was a little expansion to the standard, keeping that backward compatibility.
So there is no need for changing anything, apart from trying to "modernize" the code syntax itself. Since most of f77 code I've seen runs very efficient, I rarely have seen the need for rewriting.
Compaq's compiler was part of the line:
Microsoft Fortran Powerstation 1.0 --> then 4.0 --> Digital's version 5 --> Compaq's and now Intel's Visual Fortran which is currently at version 11.
It is a relatively stable and quality line of compilers, popular among the fortran users.
Regarding the last question, MS Excel can through import read text files, which can be written in fortran. If you're thinking of writing directly .xls files, I have not seen a library which can do that so far (please, if you know of any, supply me with a link).