Click here to load reader

第 3 章 FORTRAN90 基础知识

  • View
    85

  • Download
    0

Embed Size (px)

DESCRIPTION

第 3 章 FORTRAN90 基础知识. 1. 字符集 2. 名称 3. 关键字 4. 程序单元 5. 语句 6. 书写格式 7. 数据类型. 《 程序设计语言 (FORTRAN)》 课多媒体课件. 3.1 字符集. 概述 字符集 说明. FORTRAN 90 源程序是一个符合 FORTRAN 90 词法、语法和语义规定的特殊文本 , 它由 FORTRAN 90 字符集规定的字符按照词法、语法和语义规定进行描述。. 第三章 FORTRAN 90 基础知识. 3.1 字符集 / 字符集. 3.1 字符集. - PowerPoint PPT Presentation

Text of 第 3 章 FORTRAN90 基础知识

  • 3 FORTRAN90 1. 2. 3. 4. 5. 6. 7. (FORTRAN)

  • FORTRAN 90FORTRAN 90,FORTRAN 90 3.1 FORTRAN 90

  • 3.1 / FORTRAN 901 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h I j k l m n o p q r s t u v w x y z 20 1 2 3 4 5 6 7 8 93_4 + - * / ( ) , . ' : ! " % & ; < > ? $ Visual FORTRAN,ASCII09h(Tab)20h7Eh(IBM)3.1 FORTRAN 90

  • 3.1 / ,,INTEGER Iinteger iFORTRAN 90,_ ! " % & ; > < ?FORTRAN 903.1 FORTRAN 90

  • 3.2 (:) 3.2 PROGRAM main INTEGER length,width,area,price READ*,length,width area=length*width price=4000*area PRINT*,,price, END FORTRAN 90

  • 3.2 / {_$} _$ 31

    ,3.2 FORTRAN 90

  • 3.2 / ,,,3.2 FORTRAN 90

  • 3.2 /[3.1], Number, Max, X-Y-Z, PrOgRaM, FIND_IT, read, x, 8q, a.5, _wrong, a3b7, U.S.A., DR.WANG, china, total, x$y$z, $abcd,r a t e:Number,Max, PrOgRaM, FIND_IT, read, x, a3b7, china, total, x$y$z :X-Y-Z, 8q, a.5, _wrong,U.S.A., DR.WANG,$abcd,r a t e 3-1 INTEGER total !total SUBROUTINE example !example PROGRAM area !area LableDO I=1,N !LableDO3.2 FORTRAN 90

  • 3-1 FORTRAN 90

  • 3.3 FORTRAN 90FORTRAN 90 3.3 PROGRAM main INTEGER length,width,area,price READ*,length,width area=length*width price=4000*area PRINT*,,price, END FORTRAN 90

  • 3.3 / FORTRAN 90 IF (A
  • 3.3 / ,,,PROGRAM mainPROGRAM,,PROGRAMMING mainmain PROGRAMFORTRAN 90,(),PROGRAMINTEGERREALREADPRINTWRITEDOENDSUBROUTINEFUNCTION,PROGRAM PROGRAMPROGRAM,PROGRAM(),, 3.3 FORTRAN 90

  • 3.4 F90()(),END 3.4 PROGRAM main INTEGER length,width,area,price READ*,length,width area=length*width price=4000*area PRINT*,,price, END FORTRAN 90

  • 3.4 / FORTRAN 90,(),,PROGRAM,FORTRAN 90FUNCTIONSUBROUTINE()MODULEBLOCK DATA,(Host), 3.4 FORTRAN 90

  • 3.4 / {} [ ] [ ] [ ] [ ] PROGRAM END [ PROGRAM [ ] ] { } {} CONTAINS {}3.4 PROGRAM main INTEGER length,width,area,price READ*,length,width area=length*width price=4000*area PRINT*,,price, END FORTRAN 90

  • 3.4 / [3.2], INTEGER a,b,c a=10;b=20 c=a+b PRINT *,' a+b=',c53.4 FORTRAN 90

  • FORTRAN 90INTEGER a,b,ca=10;b=20c=a+bPRINT *,'a+b=',cEND

    INTEGER a,b,ca=10;b=20c=a+bPRINT *,'a+b=',cEND PROGRAM

    PROGRAM addINTEGER a,b,ca=10;b=20c=a+bPRINT *,'a+b=',cENDPROGRAM addINTEGER a,b,ca=10;b=20c=a+bPRINT *,'a+b=',cEND PROGRAMPROGRAM addINTEGER a,b,ca=10;b=20c=a+bPRINT *,'a+b=',cEND PROGRAM add

  • 3.5 FORTRAN 90 3.5 PROGRAM main INTEGER length,width,area,price READ*,length,width area=length*width price=4000*area PRINT*,,price, END FORTRAN 90

  • 3.5 /,,,INTEGERPRINT3-261),3.5 PROGRAM main INTEGER length,width,area,price READ*,length,width area=length*width price=4000*area PRINT*,,price, END FORTRAN 90

  • 3.6 FORTRAN,FORTRAN 90 3.6 PROGRAM main!flgjfdkjl INTEGER length,width,area,price READ*,length,width area=length*width price=4000*area PRINT*,,price, END FORTRAN 90

  • 3.6 /,F9ORTRAN903! , & ,&, Digital Visual FORTRAN 5.0,5113.6 FORTRAN 90

  • 3.6 /();,,5,0,3.6 1 PROGRAM main2 INTEGER length,width,area,price3 READ*,length,width4 area=length*width5 price=4000*area6 PRINT*,,price,7 END FORTRAN 90

  • 3.6 /,132,1,,,,;,;2640INTEGER643-53.6 FORTRAN 90

  • 3.6 /,&,Hollerith,&,FORTRAN 9039,Visual FORTRAN 5.0511&&total=100*(i+j)*& counttotal=100*(i+j)*& &count& total=100*(i+j)*co& &unt

    3.6 FORTRAN 90

  • 3.7 (),,() 3.7 PROGRAM main INTEGER length,width,area,price READ*,length,width area=length*width price=4000*area PRINT*,,price, END FORTRAN 90

  • 3.7 /,(),,(),3.7 FORTRAN 90

  • 3.7 / ,, ,, ,,0,. ASCII ASCIIASCII,7,7,ASCII128,128 3.7 FORTRAN 90

  • ASCII

  • 0+1-

    11111111

  • -34.62 = -346210-2 = -0.3462102 = -3.462101 -10.01 = -1001 2-10 = -0.1001210 = -1.00121 (),N= 2

  • 2-0.1001210 -0.1001210 = -0.01001211 = -0.0010012100 = 0.11

  • 3.7 /,,,,Fortran()8-128127,12.5+-*/FORTRAN 90,FORTRAN 903.7 FORTRAN 90

  • 3.7 // ,,,, F()8-128127,12.5+-*/ FORTRAN 90,FORTRAN 903.7 FORTRAN 90

    aaaaaaaaaaa