张林波. 利用m4定语言进行Fortran 77循环展开. 数值计算与计算机应用, 1998, 19(1): 49-63 https://doi.org/10.12288/szjs.1998.1.49 FORTRAN DO LOOP UNROLLING USING m4 MACRO LANGUGE. Journal on Numerica Methods and Computer Applications,
This paper presents a method for unrolling nested Fortran DO-loops using the m4 macro language. m4 is a macro processor widely available on UNIX platforms. By using carefully designed m4 macros, Do-loop unrolling becomes much simpler. More over, with this method, code can be written for ...
Fortran 90在Fortran 77基础上添加了不少使用的功能, 并且改良了F77编程的版面格式,所以编程时推荐使用F90。鉴于很多现成的程序只有F77版本,有必要知道F77的一些基本常识,至少保证能够看懂F77程序。以下是F77和F90的一些格式上的区别。 Fortran 77: 固定格式(fixed format),程序代码扩展名:.f或.for (1)若某行以C,...
exit终止整个循环 loop1 if(j=2) cycle loop2 !cycle跳出 loop2的本次循环,进行loop2的下次循环write(*,*) i,j end do loop2 fortran77 指导手册16 end do loop1还有一些循环主要用于fortran中的数组运算,为 40、 fortran特有,很实用。六、数组1、数组的声明和 c不同的是, fortran 中的数组元素的索引...
FORTRAN 77 5.0 is released for: TM 4 The SPARC platform Preface ix 4 The x86 platform, where x86 refers to the Intel® implementation of one of the following: Intel 80386TM , Intel 80486TM , PentiumTM , or the equivalent Fortran 90 2.0 is released for: 4 Solaris 2.5.1, 2.6, and ...
与-loopinfo 等效。3.4.150 –xM生成make 依赖项。该选项可在标准输出中为编译的源文件生成 make 依赖项。该选项涵盖源文件的所有 make 依赖项,包括头文件和 Fortran 模块。对于模块依赖项,该选项使用基于对象的模块依赖项方案,以便无需显式生成规则即可创建模块文件。
do循环,Fortran中的循环可以加标签,如d前面的interactive_loop就是标签! Prompt the user for radius and height and read them.write(*,*)'Enter radius and height.'!屏幕输出read (*,*,iostat=ierr) radius,height!键盘输入。isotat的值用判断输入成功否。! If radius and height could not be read from...
2、Fortran77后缀(.f),Fortran90后缀(.f90)。 3、固定格式与自由格式 一般默认(.f/.for) 是固定格式,(.f90)是自由格式。 固定格式就是代码采用约定的书写方式来写,代码或者符号的位置在特定地方有特定含义。一般分为标号区,注释行,续行区,语句区,注释区。代码的位置必须正确。否则编译失败。
26、ubuntu22.04+gfortran11.4.0编译运行Fortran- nestedLoop+Nested Loops示例代码 27、ubuntu22.04+gfortran11.4.0编译运行Fortran- nestedLoop+Exit Statement示例代码 28、ubuntu22.04+gfortran11.4.0编译运行Fortran- cycle_example+Cycle Statement示例代码 29、ubuntu22.04+gfortran11.4.0编译运行Fortran- stop_example+St...
integer :: a,b loop1: do a=1,10 ! 给循环取名字 loop2: do b=1,5 write(*, *) "This is a loop" end do loop2 end do loop1 3.5 特殊流程控制 ! goto 可以跳转到任意行代码 ! pause 程序暂停执行,直到用户按下Enter键 ! continue 没什么用途,直接继续执行, 注意其跟C++等其它语言的功能(...