计算化学公社

 找回密码 Forget password
 注册 Register

推荐一个Windows10下的Fortran开发环境CodeBlocks

查看数: 5898 | 评论数: 10 | 收藏 Add to favorites 4
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2020-2-27 14:16

正文摘要:

CodeBlocks 17.12内带GNU Fortran编译器的版本,也就是集成gfortran了,比Windows下那些古董级别的Fortran编译器兼容性好多了,也方便使用。本身体积也小,比起装个Cygwin再用gfortran小多了,而且是开源的。下载地 ...

回复 Reply

gsbear 发表于 Post on 2020-3-1 15:25:18
xp47 发表于 2020-2-29 15:54
vscode 找扩展 有mingw之类(别的也行,mingw的简单些) 还有fortran代码分析和自动补全。自己动手配置下 ...

可以用minGW那也不错,VSCODE界面功能确实要更丰富!
xp47 发表于 Post on 2020-2-29 15:55:29
xp47 发表于 Post on 2020-2-29 15:54:29
gsbear 发表于 2020-2-29 13:31
VSCode只是提供一个IDE编辑器,拿什么编译呢?

vscode 找扩展 有mingw之类(别的也行,mingw的简单些) 还有fortran代码分析和自动补全。自己动手配置下。
gsbear 发表于 Post on 2020-2-29 13:31:00

VSCode只是提供一个IDE编辑器,拿什么编译呢?
xp47 发表于 Post on 2020-2-28 13:15:43
vscode +1
St_Maxwell 发表于 Post on 2020-2-28 11:25:19
zjxitcc 发表于 2020-2-28 10:58
你把null()删了也行么
  1. deftype0 = deftype(1, .true.)
  2. write(*,*) deftype0%i, deftype0%alive
复制代码

编译运行后打印" 1 T "
zjxitcc 发表于 Post on 2020-2-28 10:58:27
St_Maxwell 发表于 2020-2-28 10:53
VS Code+gfortran不香么?
高版本的gfortran对新标准的支持比较完善,我在Windows下用的是gfortran 9.2。
...

你把null()删了也行么
St_Maxwell 发表于 Post on 2020-2-28 10:53:27
VS Code+gfortran不香么?
高版本的gfortran对新标准的支持比较完善,我在Windows下用的是gfortran 9.2。


gsbear 发表于 Post on 2020-2-27 23:49:43
zjxitcc 发表于 2020-2-27 14:43
请问这个支持fortran2008语法么?比如
module test_null
implicit none

没测试过最新的Fortran语法,F95是可以,至于新语法特性,你可以自己下载一个测试下
zjxitcc 发表于 Post on 2020-2-27 14:43:37
本帖最后由 zjxitcc 于 2020-2-28 11:32 编辑

请问这个支持fortran2008语法么?比如
  1. module test_null
  2. implicit none
  3. type :: deftype
  4.   integer :: i
  5.   logical :: alive
  6.   real(kind=8), allocatable :: a(:)
  7. end type
  8. end

  9. program test_f2008
  10. use test_null
  11. implicit none
  12. type(deftype) :: deftype0
  13. deftype0 = deftype(1, .true., null())
  14. stop
  15. end
复制代码



Fortran2008之前要求没赋值的地方用null()填;2008之后则可以直接不写null()。

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2025-8-13 14:46 , Processed in 1.079340 second(s), 25 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list