搜档网
当前位置:搜档网 › Fortran编译器及下载地址

Fortran编译器及下载地址

Fortran编译器及下载地址
Fortran编译器及下载地址

Fortran 编译器

---------------------------------------------------------------------------------------

1. Fortran Powerstation 4.0

Fortran Powerstation 4.0是最老的版本

下载ftp://2006:2006@https://www.sodocs.net/doc/2214812891.html,/36/https://www.sodocs.net/doc/2214812891.html,-002123.ZIP

---------------------------------------------------------------------------------------

2.CVF

Compaq Visual Fortran (CVF), 当今PC平台上功能相当强大与完整的Fortran程序开发工具,还用于Abaqus的开发。

1997年,微软将Fortran PowerStation卖给DEC之后,微软就不再出版Fortran编译器了。后来DEC并入了Compaq,再后来Compaq又和HP合并了。现在最新的版本是HP出的Fortran for Windows v6.6,现在HP/Compaq已经不再开发Fortran了,CVF 6.6是最终的版本了,Compaq的Fortran开发小组已经投入Intel旗下,目前Intel 已经有Intel Visual Fortran 11.0。Compaq Visual Fortran 6.6官方的单价也相当昂贵。

Compaq Visual Fortran 6.6 下载:

https://www.sodocs.net/doc/2214812891.html,/SoftDown.asp?ID=11937

Compaq Visual Fortran 6.6 绿色版下载:

https://www.sodocs.net/doc/2214812891.html,/down/10915.html

Compaq Visual Fortran 6.5 下载:

https://www.sodocs.net/doc/2214812891.html,/soft/fortran6.5.rar

ftp://2006:2006@https://www.sodocs.net/doc/2214812891.html,/36/https://www.sodocs.net/doc/2214812891.html,-002124.rar

---------------------------------------------------------------------------------------

3. IVF

Intel Visual Fortran (IVF)将Compaq Visual Fortran* (CVF) 语

言的丰富功能与英特尔代码生成及优化技术结合在一起。目前Intel已

经有Intel Visual Fortran 11.0。

下载:

Intel官方网站

ftp://166.111.26.159/software/science/

ftp://202.112.85.101/pub2/Windows/Scientific_Tools/Fortran/Intel.Fort 从https://www.sodocs.net/doc/2214812891.html,/maths/下载。IVF10可以用IVF9的

licence

http://registrationcenter-

https://www.sodocs.net/doc/2214812891.html,/irc_nas/730/w_cc_p_10.0.025_ia32.exe

集成VS2005的IVF10.1: w_fc_p_10.1.021.exe (302MB)

Intel(R) Visual Fortran for IA-32 and Intel(R) 64 (with

Microsoft Visual Studio 2005 Premier Partner Edition*)

下载:

https://www.sodocs.net/doc/2214812891.html,/irc_nas/1025/w_fc_p_10.1.021.exe

IVF11.0: 官方的下载地址

windows 32/em64t/ia64。含mkl。安装前需要先装VS。

http://registrationcenter-

https://www.sodocs.net/doc/2214812891.html,/irc_nas/1261/w_cprof_p_11.0.061_novsppe.exe linux ia32/em64t/ia64。含mkl。

http://registrationcenter-

https://www.sodocs.net/doc/2214812891.html,/irc_nas/1259/l_cprof_p_11.0.069.tgz

--------------------------------------------------------------------

-------------------

4. Intel Fortran Compiler for Linux

The Intel Fortran Compiler for Linux is free for personal, non-

commercial use (registration required). It features an optimizing compiler, the Intel Debugger (GUI and command-

line), mixed language support (C and Fortran), full compliance with the ISO Fortran 95 standard, support for the

evolving Fortran 2003 standard, multi-threaded application

support (OpenMP and auto-parallelization), ability to handle

big-endian data files, compatibility with various Linux tools

(like make, gdb and Emacs), substantial compatibility with

Compaq Visual Fortran, etc. The optimizing compiler supports interprocedural optimization, profile guided optimization,

automatic vectorizer, etc.

载:https://www.sodocs.net/doc/2214812891.html,/software/products/compilers/flin/noncom.htm --------------------------------------------------------------------

-------------------

5. G95

G95 is a stable, production Fortran 95 compiler available for

multiple cpu architectures and operating systems. Innovations and optimizations continue to be worked on.

Parts of the F2003 standard have been implemented in g95.

G95 is an open source Fortran 95 compiler. At the time this

was written, most of the ISO Fortran 95 standard has been implemented. Platforms supported include Linux(x86, Intel

IA64, AMD x86_64), Windows, Macintosh OS X, FreeBSD,

Sparc Solaris and HP-UX.

下载:https://www.sodocs.net/doc/2214812891.html,/

--------------------------------------------------------------------

-------------------

6. Gfortran - the GNU Fortran compiler, part of GCC

Gfortran is the name of the GNU Fortran project, developing

a free Fortran 95/2003 compiler for GCC, the GNU Compiler Collection. The gfortran development effort uses an open development environment in order to attract a larger team of

developers and to ensure that gfortran can work on multiple architectures and diverse environments. Please note that gfortran is not g95.

下载:https://www.sodocs.net/doc/2214812891.html,/

https://www.sodocs.net/doc/2214812891.html,/wiki/GFortran

--------------------------------------------------------------------

-------------------

7. Salford FTN95 Fortran 95 Compiler

Salford FTN95 is a Fortran 95 compiler that supports Fortran 77, Fortran 90 and Fortran 95. The compiler generates exectuables for Win32 (but Win32 console and GUI applications) and the Microsoft .NET framework. It comes with CHECKMATE, a tool that lets programmers check the correctness of their code at runtime. Also included is Plato 3 (an IDE), full source level debugging, documentation and examples. You may only generate code for your personal use

on your home computer, and all executables will display a banner on execution.

FTN95 compiles all Fortran 77, Fortran 90, Fortran 95 standard code and has some features from the Fortran 2003 standard.

个人版(FTN95 Personal Edition )是免费的,它具有强大的功能和

集成开发环境与已经发行多年并且停止开发的Compaq Visual Fortran相比,集成开发环境一点也不差,而且还能开发.net的应用程

序(Compaq Visual Fortran只能生成win32应用程序)。另外该软

件还提供了显示科学计算所需的2D和3D绘图工具,能节省不少开发的

工作量。

唯一不足的是生成的应用程序会显示该产品的标志,以限制开发用于商

业用途的程序。当然如果付费购买专业版的话就没有此限制。

下载:

https://www.sodocs.net/doc/2214812891.html,/32/ftn95/ftn95_personal_edition.asp https://www.sodocs.net/doc/2214812891.html,/Silverfrost-FTN95/3000-2069-

10491439.html?part=dl-Silverfro&subj=uo&tag=button

--------------------------------------------------------------------

-------------------

8. Salford FTN77 PE ANSI Fortran 77 Compiler

The Salford FTN77 PE (Personal Edition) comes with a full

optimising ANSI Fortran 77 compiler with support for various

common extensions (including MIL-STD-1753), linker,

libraries, make utility, librarian and a full screen debugger.

The compiler has a built-in assembler for inline assembly,

and the ability to link with code from other sources (such as

C++ Fortran 90 and Fortran 95 code). It is free for personal

use and for use by students. It supports Windows 95, 98 and

NT.

载:https://www.sodocs.net/doc/2214812891.html,/compilers/support/downloads.htm --------------------------------------------------------------------

-------------------

9. Open Source Watcom / OpenWatcom Fortran Compiler

The Watcom (now OpenWatcom) Fortran 77 compiler is now

available free of charge, complete with source code. This compiler, which generates code for Win32, Windows 3.1

(Win16), OS/2, Netware, MSDOS (16 and 32 bit), etc, was a

well-known compiler some years back (until Sybase terminated it).

下载:https://www.sodocs.net/doc/2214812891.html,/

--------------------------------------------------------------------

-------------------

10. MinGW?ˉS G77 (GNU Fortran)

This system comes with the GNU G77 Fortran compiler

(among other things, including a C/C++ compiler), which you

can use to generate Win32 executables from F77 code. Like

many systems based on the GNU tools, Mingw32 comes with

complete with various programming tools, such as a program maintainence program (ie, make), text processing tools (sed, grep), lexical analyser generator (flex), parser generator (bison), etc.

下载:https://www.sodocs.net/doc/2214812891.html,/

---------------------------------------------------------------------------------------

11. DJGPP GNU G77 (Fortran 77) for MSDOS

This is a development system based on the well-known GNU compiler system that includes compilers for Fortran 77, C, C++, Objective C, etc. It generates 32 bit MSDOS executables that is Windows 95 long-filename-aware. It is a very complete system with IDEs, graphics libraries, lexical analyser generators (flex), parser generators (bison), text processing utilities (like grep, sed), a program maintainence utility (ie, make), a dos extender, and so on. The compiler, utilities and libraries come with source code.

下载:https://www.sodocs.net/doc/2214812891.html,/djgpp/

---------------------------------------------------------------------------------------

12. f2j - Fortran to Java Compiler

f2j translates Fortran 77 source code to Java class files. It is distributed under the GNU GPL and runs on Linux, SunOS/Solaris

下载:https://www.sodocs.net/doc/2214812891.html,/f2j/

---------------------------------------------------------------------------------------

13. F2C - Fortran to C Translator

This is a well-known Fortran to C converter that comes with source code. The site also includes pre-compiled binaries (executables) for MSDOS and Microsoft Windows, although these are by no means the only systems supported - the

compiler works on Unix systems like BSD, Linux, etc. You have to compile the compiler yourself on those systems. Libraries containing the runtime support needed (together with the C source code) are also included. You need a C compiler to generate binaries from your Fortran sources.

下载:https://www.sodocs.net/doc/2214812891.html,/f2c/

---------------------------------------------------------------------------------------

14. FORCE Project - Fortran Compiler and Editor

FORCE is actually just an IDE for Fortran 77 that integrates the GNU Fortran 77 compiler (G77).

下载:https://www.sodocs.net/doc/2214812891.html,.br/

---------------------------------------------------------------------------------------

15. Emx/Rsx G77 (GNU Fortran)

This is another GNU Fortran port. The RSX port compiles DOS extended console applications for Win32 and the EMX port generates MSDOS extended applications as well as OS/2 applications. The compiler supports the Fortran 77 syntax.

下载:http://www.ime.rwth-

aachen.de/~michael/os2/g77/gnu_fortran.html

---------------------------------------------------------------------------------------

16. Lcc-Win32 Fortran Compiler

LCC-Win32 is primarily a free C compiler and its programming environment for Win32, but it also appears to have a Fortran compiler available for download from their website. It apparently compiles Fortran 77 code (with some common extensions) to C which is subsequently compiled by the C compiler to generate a Win32 native executable. The entire process is integrated seamlessly into the IDE so you might not even realise that intemediate C files were being

generated (they are deleted automatically when they are no longer needed). The IDE supports syntax highlighting in C and Fortran.

下载:https://www.sodocs.net/doc/2214812891.html,/~lcc-win32/

---------------------------------------------------------------------------------------

17. Compaq Fortran for Linux Alpha

This Fortran compiler is for Linux Alpha systems only. It implements the full Fortran-95 language as well as a few language extensions. It comes with a debugger (ladebug), an extended maths library (the Compaq Extended Math Library, CXML) containing technical and scientific subroutines. The licence for the free version allows it to be used for personal and educational purposes, and prohibits its use in any commercial venture.

下载:https://www.sodocs.net/doc/2214812891.html,/fortran/linux/te-info.html ---------------------------------------------------------------------------------------

18. Open Source Watcom / OpenWatcom Fortran Compiler

在和微软及Borland的C++开发工具竞争失败后,Watcom 改变了发展策略,致力于开发开放源代码的免费开发工具。虽然现在已经被收购,但其开发的C++和Fortran 编译器仍旧很好用,不过不能支持最新的.net应用程序开发是个遗憾,并且对Fortran 的支持也只是限于Fortran 77 。除windows版本外,该编译器还有OS/2的版本,并且还提供完整的手册可供下载。

下载:https://www.sodocs.net/doc/2214812891.html,/index.php/Download

---------------------------------------------------------------------------------------

19. Xeffort

Xeffort is a free, open-source library for building GUI applications in all flavors of Visual Fortran?.

https://www.sodocs.net/doc/2214812891.html,/

https://www.sodocs.net/doc/2214812891.html,/post/print?bid=124&id=427278

---------------------------------------------------------------------------------------

20. F5.1

MS FORTRAN 5.1

---------------------------------------------------------------------------------------

注:随着时间的推移,上面提供的有些下载地址可能会不再有效。各位如发现新的下载地址,请留言。

FORTRAN程序设计复习题及答案

FORTRAN程序设计复习题 一、选择题 B (1)下列各FORTRAN表达式中合法的是 A) S+T*2P >= B) .NOT. (A*B+C) C) A2+B2/(C+D) <= D) (A+B).NOT.A*B.GT.(.NOT.只跟一个表达式) C (2)数学式(3/5)ex+y的FORTRAN表达式是 A) 3*EXP(X+Y)/5 B) 3*E* *(X+Y)/ C) (3/5)*EXP(X+Y)D) EXP(X+Y) D (3)下列FORTRAN77表达式中不合法的是 A) A.GT.B.EQV.C.GT.D B) A.AND.B.AND.C.AND.D C) .NOT.(X.LE.D) A.LT.B.LT.C.LT.D D(4)下列叙述中不正确的是 A) FORTRAN子程序可以单独编译 B) 对一个FORTRAN源程序进行编译和连接无误后可生成可执行文件 C) 即使编译和连接都正确无误,FORTRAN程序运行时仍可能出错 D) FORTRAN连接的主要任务是把函数库中的函数翻译成机器指令(正确描述:主要任务为连接目标文件) B (5)在下列FORTRAN77运算符中,优先级最高的是 A) .AND. B) .NOT. C) .OR. D) .EQ. B (6)FORTRAN表达式"6/5+9/2**3/2"的值为 A) 33 B) 1 C) 5 D) 3 A (7)下列FORTRAN77表达式中,合法的是: A) .AND.. B) 10.0 C) D) 提示:A)相当于 .AND.(.NOT.()) D (8)关于编译一个FORTRAN源程序文件,下列说法中错误的是 A) 允许编译只有一个主程序而没有子程序的源文件 B) 允许编译有多个子程序的源文件 C) 允许编译只有一个子程序而没有主程序的源文件 D) 允许编译有多个主程序的源文件 C (9)在FORTRAN77源程序中,续行标志符必须放在 A) 第1列 B) 第1-6列C) 第6列D) 第5列 D (10)下列关于"SUBROUTIN E MAP(X,Y)"语句行的叙述中,不正确的是 A) 这是子程序的第一个语句 B) 字符串"MAP"是子程序名 C) 变量X是子程序的形参D) 子程序执行后,MAP将返回整型数据 提示:子程序无返回值,自定义函数才有) A (11)FORTRAN表达式"2/4+"的值是 A) B) 1 C) D) 0 提示:2/4默认等于整型,=》 D (12)FORTRAN表达式"MOD,"的值是 A) B)0.0 C) D) A (13下列FORTRAN运算符中,优先级最低的是 A)逻辑运算符.AND. B)算术运算符*

fortran常见问题解决

楼主为了减少重复回答问题,特编此帖,并不定期添加和更新内容。 错误难免,欢迎讨论,仅供参考。 很多人问哪里可以找到Fortran编译器,有不少热心学友提供网址,特汇集在这里。虽然俺检验过这些链接,但是它们不一定总有效。 Fortran编译器下载: CVF? FTN95(License:Freeforpersonaluse) 以下操作,如无特别说明,都是以为例。 1.如何加大Stacksize? 选Project=>Settings=>Link=>Category:Output=>? Stackallocations Reserve:这里填新值(默认为1M,若需要10M,则填) 2.如何用Fortran批量生成文件? 设要生成4000个文件,文件名为AA1-AA4000,如何写循环生成文件,而不用写4000次write 命令呢? 用内部文件: character(len=80)::filename,form integer::i doi=1,4000 selectcase(i) case(1:9) write(form,'(i1)')i case(10:99) write(form,'(i2)')i case(100:999) write(form,'(i3)')i case(1000:9999) write(form,'(i4)')i endselect write(filename,*)"AA",trim(form),".TXT" open(10,file=filename) write(10,*)i close(10)

enddo? stop end 3.如何用Fortran动态生成输出格式? 设有一个数组data(100),输出时,希望每行输出num个数,而num由用户输入,如何实现? 用内部文件: character(len=80)::form real::data(100) integer::i,num data=(/(i,i=1,100)/)/ read(*,*)num write(form,*)"(",num,"" write(*,form)data stop end 4.MS是不是很垃圾? 是垃圾,其中Bug太多,多到不可用的地步! 在这个主题里,换了CVF后问题就没了的人已有相当的数目。 如果你用,遇到莫名其妙的错误,建议换,这是一个比较成熟的编译器。 5.如何用F90/95生成随机数? 注意: 现在计算机产生的随机数都是伪随机数。 random_number(x)产生一个0到1之间的随机数(x可以是向量),但是每次总是那几个数。用了random_seed()后,系统根据日期和时间随机地提供种子,使得随机数更随机了。 programrandom implicitnone real::x callrandom_seed()!系统根据日期和时间随机地提供种子 callrandom_number(x)!每次的随机数就都不一样了 write(*,*)x stop endprogramrandom 6.函数/子程序超载的例子

(完整)Fortran经典编程语言笔记(你值得拥有)

FORTRAN笔记 2014.10.07 目录 第七讲_FORTRAN的基本知识.ppt (2) FORTRAN语言程序设计初步 (2) FORTRAN源程序的书写格式(以77为例) (2) 变量 (2) 变量类型 (2) 算术运算符和运算优先级 (3) 赋值语句 (3) 参数语句(PARAMETER语句) (3) END语句 (3) PAUSE语句 (3) 逻辑运算和选择结构 (4) 关系表达式 (4) FORTRAN中数组的定义及使用 (4) 其他 (5) 1. fortran语言定义CHARACTER*6 TTL(14,3),CNAM(400)是什么意思? (5) 2. fortran里character*10 是什么意思 (5) 3. Fortran中kind是什么函数? (5)

第七讲_FORTRAN的基本知识.ppt FORTRAN语言程序设计初步 FORTRAN是Formula Translation的缩写,意为“公式翻译”,它是为科学、工程问题或企事业管理中的那些能够用 数学公式表达的问题而设计的,其数值计算的功能较强。 常用的是FORTRAN77和FORTRAN90两种标准。 1、一个程序由若干个程序单位组成。主程序和每一个子程序分别是一个独立的程序单位。 2、每一个程序单位都是以“END”结束的。 3、一个程序单位包括若干行。 1)语句行。由一个FORTRAN语句组成。 2)非语句行,即注释行。 4、FORTRAN程序中的语句可以没有标号,也可以有标号,根据需要而定。标号的作用是标志一个语句以便被其 他语句引用。 5、一个程序单位中各类语句的位置是有一定规定的。 6、FORTRAN源程序必须按一定的格式书写。 FORTRAN源程序的书写格式(以77为例) 每一行有80列,分别如下: 1、第1-5列为标号区。一行中第一列为“C”或“*”,该行即被认为是注释行。 2、第6列为“续行标志区”,如果在一行的第6列上写一个非空格和非零的字符,则该行作为其上一行的续行。 3、第7-72列为语句区。 4、第73-80列,注释区。 变量 变量名:一个变量需要用一个名字(变量名)来识别。在同一个程序单位中不能用同一个变量名代表两个不同的变 量。 FORTRAN的变量名按以下规则选定: 1)第一个字符必须是字母,即变量名必须以字母开头; 2)在一个字母后面可以跟1-5为数字或字母。 如果选定的变量名超过6个字符,则只有前面6个字符有效。 注:在变量名中大写与小写字母是等价的。 变量类型 整型变量Integer、实型变量Real、双精度变量Double Precision、复型变量Complex、逻辑型变量Logical和字符型变量Character。 1、隐含约定(I-N规则) FORTRAN规定:在程序中的变量名,凡以字母I,J,K,L,M,N六个字母开头的,即认为该变量为整型变量。 在程序中,凡是变量名以字母I,J,K,L,M,N,i,j,k,l,m,n开头的变量被默认为整型变量,以其他字母开头的变量被 默认为实型变量。 2、用类型说明语句确定变量类型 1)INTEGER语句(整型说明语句) 2)REAL语句(实型说明语句) 3)DOUBLE PRECISION语句(双精度说明语句) 4)COMPLEX语句(复型说明语句) 5)LOGICAL语句(逻辑型说明语句)

一些 免费的fortran编译器

一些免费的fortran编译器 https://www.sodocs.net/doc/2214812891.html,/node/8 Free Fortran Compilers 取自https://www.sodocs.net/doc/2214812891.html,/compilers/fortran.shtml This page lists free Fortran compilers for various operating systems. Some of the compilers are compliant with the ANSI Fortran 77 specifications, others with Fortran 95, and so on. Some of them may also come complete with debuggers, editors and an integrated development environment (IDE). If you need a book on Fortran, you may want to check out the selection of books available at https://www.sodocs.net/doc/2214812891.html,. Disclaimer The information provided on this page comes without any warranty whatsoever. Use it at your own risk. Just because a program, book or service is listed here or has a good review does not mean that I endorse or approve of the program or of any of its contents. All the other standard disclaimers also apply. Free Fortran Compilers and IDEs Sun Studio Compilers and Tools Sun Studio Compilers and Tools for Linux and Solaris OS on Sparc and x86/x64 platforms includes command line tools as well as a NetBeans-based IDE for developing, compiling and debugging C, C++ and Fortran programs. It also includes performance analysis tools. Intel Fortran Compiler for Linux

Fortran软件安装大全

为大家介绍fortran编译软件,和imsl库的使用,有些地址已失效,有些软件在群共享里VS破解用百度的序列号,ivf用crack文件里的许可文件(.lic)。 一.跟上时代的脚步:Visual studio2012+intel visual fortran2013, (兼容win7 64位32 位)目前是最新的组合,配合强大的vs2012编译器,全新的VS界面感触以及操作。仅这个可以跑在win8系统上。 https://www.sodocs.net/doc/2214812891.html,/d/iMuvAwLMJAC8l1tR9cd 二.推荐使用IVF2011+MVS2008(兼容win7 64位32 位) 下载方案地址:https://www.sodocs.net/doc/2214812891.html,/p/1536274172 mvs2008:https://www.sodocs.net/doc/2214812891.html,/topics/2743184/ ivf2011:https://www.sodocs.net/doc/2214812891.html,/topics/2901142/ 安装看页面评论, IVF版本自带MKL(Intel数学核心库) 三.通用版本:MVS2008+ivf11.0.061(兼容win7 64位32 位) mvs2008:https://www.sodocs.net/doc/2214812891.html,/topics/2743184/ ivf11.0.061 :https://www.sodocs.net/doc/2214812891.html,/topics/2746349/ 安装看页面评论, IVF版本自带MKL(Intel数学核心库) 四.IMSL6.0下载地址:https://www.sodocs.net/doc/2214812891.html,/post-310268.html(下载32位的IMSL库)安装方法:https://www.sodocs.net/doc/2214812891.html,/s/blog_6c7caddf0100n8up.html(仔细认真看) 安装参考:https://www.sodocs.net/doc/2214812891.html,/html/kaifa/281/2011/09/024*********.htm 这个imsl6.0只支持第三个fortran版本组合。 五.大名鼎鼎的CVF了,自带IMSL库,在群共享里,跑在xp上,win7可能不兼容。

几种Fortran 编译器简介

几种Fortran 编译器 --------------------------------------------------------------------------------------- 1.CVF Compaq Visual Fortran (CVF), 当今PC平台上功能相当强大与完整的Fortran程序开发工具,还用于Abaqus的开发。 1997年,微软将Fortran PowerStation卖给DEC之后,微软就不再出版Fortran编译器了。后来DEC并入了Compaq,再后来Compaq又和HP合并了。现在最新的版本是HP出的Fortran for Windows v6.6,现在HP/Compaq已经不再开发Fortran了,CVF 6.6是最终的版本了,Compaq的Fortran开发小组已经投入Intel旗下,目前Intel已经有Intel Visual Fortran 11.0。Compaq Visual Fortran 6.6官方的单价也相当昂贵。 Compaq Visual Fortran 6.6 下载: https://www.sodocs.net/doc/2214812891.html,/SoftDown.asp?ID=11937 Compaq Visual Fortran 6.6 绿色版下载: https://www.sodocs.net/doc/2214812891.html,/down/10915.html Compaq Visual Fortran 6.5 下载: https://www.sodocs.net/doc/2214812891.html,/soft/fortran6.5.rar ftp://2006:2006@https://www.sodocs.net/doc/2214812891.html,/36/https://www.sodocs.net/doc/2214812891.html,-002124.rar --------------------------------------------------------------------------------------- 2. IVF Intel Visual Fortran (IVF)将Compaq Visual Fortran* (CVF) 语言的丰富功能与英特尔代码生成及优化技术结合在一起。目前Intel已经有Intel Visual Fortran 11.0。 下载: Intel官方网站 ftp://166.111.26.159/software/science/ ftp://202.112.85.101/pub2/Windows/Scientific_Tools/Fortran/https://www.sodocs.net/doc/2214812891.html,p iler/ 从https://www.sodocs.net/doc/2214812891.html,/maths/下载。IVF10可以用IVF9的licence https://www.sodocs.net/doc/2214812891.html,/irc_nas/730/w_cc_p_10.0.025_ia3 2.exe 集成VS2005的IVF10.1:w_fc_p_10.1.021.exe (302MB) Intel(R) Visual Fortran for IA-32 and Intel(R) 64 (with Microsoft Visual Studio 2005

Fortran95程序设计课后习题答案(word版方便)

第四章 1.program main implicit none write(*,*) "Have a good time." write(*,*) "That's not bad." write(*,*) '"Mary" isn''t my name.' end program 2.program main real, parameter :: PI=3 implicit none.14159 real radius write(*,*) "请输入半径长" read(*,*) radius write(*,"(' 面积='f8. 3)") radius*radius*PI end program 3.program main implicit none real grades write(*,*) "请输入成绩" read(*,*) grades write(*,"(' 调整后成绩为'f8.3)") SQRT(grades)*10.0 end program 4.integer a,b real ra,rb a=2 b=3 ra=2.0 rb=3.0 write(*,*) b/a ! 输出1, 因为使用整数计算, 小数部分会无条件舍去write(*,*) rb/ra ! 输出1.5 5.p rogram main implicit none type distance real meter, inch, cm end type type(distance) :: d write(*,*) "请输入长度:" read(*,*) d%meter d%cm = d%meter*100 d%inch = d%cm/2.54 write(*,"(f8.3'米='f8.3'厘米='f8.3'英寸')") d%meter, d%cm, d%inch end program 第五章 1.program main implicit none integer money real tax write(*,*) "请输入月收入" read(*,*) money if ( money<1000 ) then tax = 0.03 else if ( money<5000) then tax = 0.1 else tax = 0.15 end if write(*,"(' 税金为'I8)") nint(money*tax) end program 2.program main implicit none integer day character(len=20) :: tv write(*,*) "请输入星期几" read(*,*) day select case(day) case(1,4) tv = "新闻" case(2,5) tv = "电视剧" case(3,6) tv = "卡通" case(7) tv = "电影" case default write(*,*) "错误的输入" stop end select write(*,*) tv end program 3.program main implicit none integer age, money real tax write(*,*) "请输入年龄" read(*,*) age write(*,*) "请输入月收入" read(*,*) money if ( age<50 ) then if ( money<1000 ) then tax = 0.03 else if ( money<5000 )then tax = 0.10 else tax = 0.15 end if else if ( money<1000 ) then tax = 0.5 else if ( money<5000 )then tax = 0.7 else tax = 0.10 end if end if write(*,"(' 税金为'I8)") nint(money*tax) end program 4.program main implicit none integer year, days logical mod_4, mod_100, mod_400 write(*,*) "请输入年份" read(*,*) year mod_4 = ( MOD(year,4) == 0 ) mod_100 = ( MOD(year,100) == 0 ) mod_400 = ( MOD(year,400) == 0 ) if ( (mod_4 .NEQV. mod_100) .or. mod_400 ) then days = 366 else days = 365 end if write(*,"('这一年有'I3'天')") days stop end program 第六章 1.program main implicit none integer i do i=1,5 write(*,*) "Fortran" end do stop end program 2.program main implicit none integer i,sum sum = 0 do i=1,99,2 sum = sum+i end do write(*,*) sum stop end program 3.program main implicit none integer, parameter :: answer = 45 integer, parameter :: max = 5 integer weight, i do i=1,max write(*,*) "请输入体重" read(*,*) weight if ( weight==answer ) exit end do if ( i<=max ) then write(*,*) "猜对了" else write(*,*) "猜错了" end if stop end program 4.program main implicit none integer, parameter :: max=10 integer i real item real ans ans = 1.0 item = 1.0 do i=2,max item = item/real(i) ans = ans+item

FORTRAN 95 语法速查

FORTRAN 95 语法速查 ----------白云、李学哲、陈国新、贾波编著《FORTRAN95程序设计》读书笔记 目录:一、应用程序的创建与运行/FORTRAN 95所用的字符/ 变量类型及其声明,常量声明/表达式与运算符 二、输入与输出:表控、有格式 三、选择语句与结构:IF语句、CASE结构 四、DO循环结构 五、数组:数组的声明,数组的引用,数组的算术运算,数组的输入、输出,给数组赋初值, 动态数组,WHERE、FORALL语句 六、子程序:语句函数,内部子程序,调用子程序时的虚实结合:形参为数组、非定界数组、子 程序名、星号,递归子程序,外部子程序,纯子程序,逐元子程序 七、派生数据类型与结构体 八、指针与动态链表 九、文件:存取方式,基本操作语句,各类文件的读写操作 十、接口、模块 十一、公用区、存储关联、数据块子程序 十二、绘图:坐标系、设置图形颜色、创建图形程序/ 常用过程:设置线型、绘一像素点、设置当前位置、绘直线、绘弧线、绘矩形、绘多边形、绘制扇形(圆、椭圆)/ 文字信息的显示 附/录:标准函数与标准子例行程序 一、基础部份 1-1 FORTRAN 95 应用程序的创建与运行 创建或运行FORTRAN 95程序必须在Microsoft Developer Studio平台上进行。尽管程序文本及相关文件的编辑可以在任一文本编辑器上进行,然后再拷到Studio的文档窗口中。但最好还是一开始就进入Studio环境。创建FORTRAN 95 程序的步骤大致如下: 1)启动Microsoft Developer Studio 可以通过不同方式运行dfdev.exe程序以启动Microsoft Developer Studio [开始] \ Compaq Visual Fortran 6 \ Developer Studio \ dfdev.exe:或 ……\CVF66 \https://www.sodocs.net/doc/2214812891.html,\MSDEV98\dfdev.exe Microsoft Developer Studio的界面如下图所示: 文档窗口 工作空间窗口 输出窗口

计算机程序设计语言(FORTRAN语言)

计算机程序设计语言(FORTRAN语言) (总分:36.00,做题时间:90分钟) 一、 (总题数:36,分数:36.00) 1.编译程序能将高级语言编写的源程序转换成( )。 A.解释程序 B.汇编程序 C.映象程序 D.目标程序 (分数:1.00) A. B. C. D. √ 解析: 2.一个完整的FORTRAN源程序( )。 A.至少包括一个主程序 B.至少包括一个主程序和一个子程序 C.由一个主程序与一个以上的子程序组成 D.由一个主程序与一个子程序组成 (分数:1.00) A. √ B. C. D. 解析: 3.语句函数定义语句在程序内合法的位置是( )。 A.在程序块开头语句之后,END语句之前 B.在程序块开头语句之后,可执行语句之前 C.在说明语句之后,END语句之前 D.在说明语句之后,可执行语句之前 (分数:1.00) A. B. C. D. √ 解析: 4.下列关于函数子程序虚实参数的错误说法是( )。 A.可以没有形参数 B.虚实结合的数组长度可以不同 C.实参表与虚参表类型可以不同 D.函数名可以作为虚参

(分数:1.00) A. B. C. √ D. 解析: 5.下列叙述中正确的是( )。 A.FORTRAN程序块中,无名公用语句只能有一个B.FORTRAN子程序中,至少应有一个RETURN语句C.FORTRAN程序块中,最后一行必须是END语句D.FORTRAN程序块中,必须有变量说明语句 (分数:1.00) A. B. C. √ D. 解析: 6.运行下面的程序时得不到所需的结果,其主要原因是( )。INTEGER X(11) DATA X/9,8,7,6,5,4,3,2,1,0,-1/ DO 10 1=1,X(1) ,-1 WRITE(*,*)1.0/SQRT(25.0-REAL(X(1) )* * 2) 10 CONTINUE END A.没有给X(11) 赋初值 B.发生除以零的情况 C.发生负数开平方的情况 D.循环参数设置错误 (分数:1.00) A. B. C. D. √ 解析: 7.下列数据中,不符合FORTRAN常量表示法的是( )。 A.-25.6 B.2.758D3 C.'FOOT"=' D.TRUE (分数:1.00) A. B. C. D. √ 解析:

Fortran编译器及下载地址

Fortran 编译器 --------------------------------------------------------------------------------------- 1. Fortran Powerstation 4.0 Fortran Powerstation 4.0是最老的版本 下载ftp://2006:2006@https://www.sodocs.net/doc/2214812891.html,/36/https://www.sodocs.net/doc/2214812891.html,-002123.ZIP --------------------------------------------------------------------------------------- 2.CVF Compaq Visual Fortran (CVF), 当今PC平台上功能相当强大与完整的Fortran程序开发工具,还用于Abaqus的开发。 1997年,微软将Fortran PowerStation卖给DEC之后,微软就不再出版Fortran编译器了。后来DEC并入了Compaq,再后来Compaq又和HP合并了。现在最新的版本是HP出的Fortran for Windows v6.6,现在HP/Compaq已经不再开发Fortran了,CVF 6.6是最终的版本了,Compaq的Fortran开发小组已经投入Intel旗下,目前Intel 已经有Intel Visual Fortran 11.0。Compaq Visual Fortran 6.6官方的单价也相当昂贵。 Compaq Visual Fortran 6.6 下载: https://www.sodocs.net/doc/2214812891.html,/SoftDown.asp?ID=11937 Compaq Visual Fortran 6.6 绿色版下载: https://www.sodocs.net/doc/2214812891.html,/down/10915.html Compaq Visual Fortran 6.5 下载: https://www.sodocs.net/doc/2214812891.html,/soft/fortran6.5.rar ftp://2006:2006@https://www.sodocs.net/doc/2214812891.html,/36/https://www.sodocs.net/doc/2214812891.html,-002124.rar ---------------------------------------------------------------------------------------

fortran语言语法

FORTRAN是世界上最早出现的高级编程语言,是工程界最常用的编程语言,它在科学计算中(如航空航天、地质勘探、天气预报和建筑工程等领域)发挥着极其重要的作用。经过40多年的发展,伴随着FORTRAN语言多次版本的更新及相应开发系统的出现,其功能不断完善,最新版本的开发系统几乎具备了VC、VB的所有特点,如图形界面编程、数据库等。目前,工科院校开设的计算机编程语言课首选仍然是FORTRAN :< 说实话,从科技发展的趋势来说这不是好事。您可以设想一下,如果需要用鹅毛笔抄写大量的古籍是什么感受! 强烈建议阅读《发掘C#特性赋予科学计算项目以威力》 1 FORTRAN77四则运算符 + - * / ** (其中**表示乘方) 在表达式中按优先级次序由低到高为: +或-→*或/→**→函数→() 2 FORTRAN77变量类型 隐含约定:I-N规则 凡是以字母I,J,K,L,M,N六个字母开头的,即认为是整型变量,其它为实型变量。 用类型说明语句确定变量类型:可以改变I-N规则

用IMPLICIT语句将某一字母开头的全部变量指定为所需类型 如IMPLICIT REAL (I,J) 三种定义的优先级别由低到高顺序为:I-N规则→IMPLICIT语句→类型说明语句,因此,在程序中IMPLICIT语句应放在类型说明语句之前。 数组的说明与使用 使用I-N规则时用DIMENSION说明数组,也可在定义变量类型同时说明数组,说明格式为:数组名(下标下界,下标上界),也可省略下标下界,此时默认为1,例:DIMENSION IA(0:9),ND(80:99),W(3,2),NUM(-1:0),A(0:2,0:1,0:3)

FORTRAN-90-程序编程规范

FORTRAN 90 程序编程规范 Fortran 90 编程规范,使程序代码高度组织化,更加易读、易懂、易于维护,程序更加高效。使编出的程序更易懂、易于维护。 1 语言选择 数值预报创新系统软件开发应避免使用Fortran77 的某些过时特征以Fortran 90不一致的特征。选择Fortran 90 作为开发语言,并采用Fortran 90 的新功能,如动态内存的分配(dynamic memory allocation)、递归(recursion ), 模块(modules)、POINTER 、长变量名、自由格式等。 Fortran 77其中某些只是一些冗余的功能,这些功能已经过时,另外,还有一些在Fortran90 中被证明是不好的用法,建议不要使用。 2 Fortran 90 的新特性 2.1.1 建议使用的Fortran 90 新特性 建议使用Fortran 90 提供的模块(module ),并用Use ONLY 指定module 中哪些变量或派生类型定义可用于调用程序。 尽量使用数组下标三元组,这样可优化并减少所需的代码行数。为提高可读性,要在括号内表明数组的维数,例如: 1dArrayA(:) = 1dArrayB(:) + 1dArrayC(:) 2dArray(: , :) = scalar * Another2dArray(: , :) 当访问数组的子集时,例如在有限差分等式中,可以通过使用下标三元组实现。例如:2dArray(: , 2:len2) = scalar *( & Another2dArray(:, 1:len2 -1) & - Another2dArray(:, 2:len2) & ) 对程序单元(program units )命名,并使用End program ,End subroutine ,End interface ,End module 等结构再次指定“program unit ”的名称。 在逻辑表达式中使用>、 >=、 ==、 <、 <=、 /=,它们分别代 替.gt.、.ge.、.eq.、.lt.、.le.、.ne. 。新的表示方法更接近标准的数学符号

fortran语法手册

1F O R T R A N77四则运算符+ - */ ** (其中**表示乘方) 在表达式中按优先级次序由低到高为:+或-→*或/→**→函数→() 2 FORTRAN77变量类型 隐含约定:I-N规则 凡是以字母I,J,K,L,M,N六个字母开头的,即认为是整型变量,其它为实型变量。 如IMPLICIT REAL (I,J) 三种定义的优先级别由低到高顺序为:I-N规则→IMPLICIT语句→类型说明语句,因此,在程序中IMPLICIT语句应放在类型说明语句之前。 数组的说明与使用 使用I-N规则时用DIMENSION说明数组,也可在定义变量类型同时说明数组,说明格式为:数组名(下标下界,下标上界),也可省略下标下界,此时默认为1,例:DIMENSION IA(0:9),ND(80:99),W(3,2),NUM(-1:0),A(0:2,0:1,0:3) REAL IA(10),ND(80:99)使用隐含DO循环进行数组输入输出操作:例如 WRITE(*,10) ('I=',I,'A=',A(I),I=1,10,2) 10FORMAT(1X,5(A2,I2,1X,A2,I4)) 使用DATA语句给数组赋初值 变量表中可出现变量名,数组名,数组元素名,隐含DO循环,但不许出现任何形式的表达式:例如 DATA A,B,C/,, DATA A/,B/,C/ DATA A,B,C/3*CHARACTER*6 CHN(10) DATA CHN/10*''/INTEGER NUM(1000) DATA (NUM(I),I=1,500)/500*0/,(NUM(I),I=501,1000)/500*1/ 3 FORTRAN77程序书写规则

Fortran的主要版本及差别

、Fortran的主要版本及差别 按其发展历史,Fortran编译器的版本其实很多。现在在广泛使用的是Fortran 77和Fortr an90。 Fortran 90在Fortran 77基础上添加了不少使用的功能,并且改良了77编程的版面格式, 所以编程 时推荐使用90。鉴于很多现成的程序只有77版本,有必要知道77的一些基本常识,至少保 证能够看 懂77程序。以下是77和90的一些格式上的区别。 Fortran 77:固定格式(fixed format),程序代码扩展名:.f或.for (1)若某行以C,c或*开头,则该行被当成注释; (2)每行前六个字符不能写程序代码,可空着,或者1~5字符以数字表明行代码(用作格 式化输入 输出等);7~72为程序代码编写区;73往后被忽略; (3)太长的话可以续行,所续行的第六个字符必须是"0"以外的任何字符。 Fortran 90:自由格式(free format),扩展名:.f90 (1)以"!"引导注释; (2)每行可132字符,行代码放在每行最前面; (3)以&续行,放在该行末或下行初。 以下都是讨论Fortran 90。 3、Fortran的一些特点,和C的一些不同 其实很多,在下面涉及具体方面时可以看到。这里只是大致提一些。 (1)不分大小写 (2)每句末尾不必要写分号 (3)程序代码命令间的空格没有意义 (4)不像C,Fortran不使用{ } (5)数据类型多出了复数和逻辑判断类型。比如复数类型 complex :: a !声明复数的方法。复数显然方便了科学计算,满足了工程方面

的需求 a=(1.0,2.0) ! a=1+i (6)多出了乘幂运算(**)。乘幂除了整数还可以是实数形式。如开方,开立方 a=4.0**0.5,a=8.0**(1.0/3.0)。 (7)数组有一些整体操作的功能;可以方便的对部分元素进行操作 (8)有些情况下可以声明大小待定的数组,很实用的功能 4、Fortran的基本程序结构 先看一看所谓的"Hello Fortran"程序。 program main !程序开始,main是program的名字,完全自定义write(*,*) "Hello" !主程序 stop !终止程序 end [program[main]] !end用于封装代码,表示代码编写完毕。 [ ]中的内容可省略,下同。 再看一段实用一些的程序,好有点感性认识。程序用于计算圆柱的表面积,要求输入底面 半径和 高。其中展示了Fortran的一些特色用法。程序摘自维基。其实是一个叫https://www.sodocs.net/doc/2214812891.html, 的网上引 用的维基的网页。推荐去看看!能查到不少有意思的东西。 program cylinder !给主函数起个名字 ! Calculate the area of a cylinder. ! ! Declare variables and constants. ! constants=pi ! variables=radius squared and height implicit none ! Require all variables to be explicitly declared !这个一般都是要写上的。下面会进一步说明。

Fortran基本用法小结档

Fortran基本用法小结 目录: 一、说明 二、概述 三、数据类型及基本输入输出 四、流程控制 五、循环 六、数组 七、函数 八、文件 一、说明 本文多数内容是我读彭国伦《Fortran 95 程序设计》的笔记。只读到第九章,主要是3~9章,都是些最基本的用法(原书共16章)。这里主要摘录了我看书过程中总结的一些Fortran和C不同的地方,主要是语法方面。希望这份笔记能够给学过C但没有接触过Fortran的同学带去一些帮助。要想弄得更清楚些,推荐看一下原书,觉得作者真的写得很好,很清楚;如果有C语言的基础,看完前九章应该很快的,花一两天就行了。觉得如果耐心看完本文,基本功能应该也可以顺利用起来了。 另外,由于我之前没有用过Fortran,这次为了赶文档看书又看得很粗浅,大多数东西看过之后都没来得及仔细想,只是按着作者的意思去理解。所以这份笔记还处于纸上谈兵的层次。如果有不妥的地方,希望大家指正。谢谢! 文中蓝色的部分是程序代码,!后面的内容为注释。 二、概述 1、名词解释 Fortran=Formula Translator/Translation 一看就知道有什么特色了:可以把接近数学语言的文本翻译成机械语言。的确,从一开始,IBM设计它的时候就是为了方便数值计算和科学数据处理。设计强大的数组操作就是为了实现这一目标。Fortran奠定了高级语言发展的基础。现在Fortran在科研和机械方面应用很广。 2、Fortran的主要版本及差别 按其发展历史,Fortran编译器的版本其实很多。现在在广泛使用的是Fortran 77和Fortran90。Fortran 90在Fortran 77基础上添加了不少使用的功能,并且改良了77编程的版面格式,所以编程时推荐使用90。鉴于很多现成的程序只有77版本,有必要知道77的一些基本常识,至少保证能够看懂77程序。以下是77和90的一些格式上的区别。

fortran语法手册

1 FORTRAN77四则运算符 + - * / ** (其中**表示乘方) 在表达式中按优先级次序由低到高为: +或-→*或/→**→函数→() 2 FORTRAN77变量类型 2.1 隐含约定:I-N规则 凡是以字母I,J,K,L,M,N六个字母开头的,即认为是整型变量,其它为实型变量。 如 IMPLICIT REAL (I,J) 三种定义的优先级别由低到高顺序为:I-N规则→IMPLICIT语句→类型说明语句,因此,在程序中IMPLICIT语句应放在类型说明语句之前。 2.4 数组的说明与使用 使用I-N规则时用DIMENSION说明数组,也可在定义变量类型同时说明数组,说明格式为:数组名(下标下界,下标上界),也可省略下标下界,此时默认为1,例: DIMENSION IA(0:9),ND(80:99),W(3,2),NUM(-1:0),A(0:2,0:1,0:3) REAL IA(10),ND(80:99)使用隐含DO循环进行数组输入输出操作:例如 WRITE(*,10) ('I=',I,'A=',A(I),I=1,10,2) 10FORMAT(1X,5(A2,I2,1X,A2,I4)) 2.5 使用DATA语句给数组赋初值 变量表中可出现变量名,数组名,数组元素名,隐含DO循环,但不许出现任何形式的表达式:例如 DATA A,B,C/-1.0,-1.0,-1.0/ DATA A/-1.0/,B/-1.0/,C/-1.0/ DATA A,B,C/3*-1.0/CHARACTER*6 CHN(10)

DATA CHN/10*' '/INTEGER NUM(1000) DATA (NUM(I),I=1,500)/500*0/,(NUM(I),I=501,1000)/500*1/ 3 FORTRAN77程序书写规则 程序中的变量名,不分大小写; 变量名称是以字母开头再加上1到5位字母或数字构成,即变更名字串中只有前6位有效; 一行只能写一个语句; 程序的第一个语句固定为PROGRAM 程序名称字符串 某行的第1个字符至第5个字符位为标号区,只能书写语句标号或空着或注释内容; 某行的第1个字符为C或*号时,则表示该行为注释行,其后面的内容为注释内容; 某行的第6个字符位为非空格和非0字符时,则该行为上一行的续行,一个语句最多可有19个续行; 某行的第7至72字符位为语句区,语句区内可以任加空格以求美观; 某行的第73至80字符位为注释区,80字符位以后不能有内容。 4 FORTRAN77关系运算符 .GT. 大于 .GE. 天于或等于 .LT. 小于 .LE. 小于或等于 .EQ. 等于 .NE. 不等于 .AND. 逻辑与 .OR. 逻辑或 .NOT. 逻辑非 .EQV. 逻辑等 .NEQV. 逻辑不等 运算符优先级由高到低顺序为:()→**→*或/→+或-→.GT.或.GE.或.LT.或.LE.或.EQ.或.NE.→.NOT.→.AND.→.OR.→.EQV.或.NEQV 5 FORTRAN77语句

相关主题