1 Data Types 1 1 Simple Data Types integer(specs)[attrs] :: i integer real(specs)[attrs] :: r complex(specs)[attrs] :: z logical(specs)[attrs] :: b character(specs)[attrs] :: s real parameter :: c = 2 9e1 real(idp) :: d; d = 1 0d0 s2=s(2:5); s2=s(:5); s2=s(5:)
Previous PDF | Next PDF |
[PDF] A Fortran Primer: (and cheat sheet)
make and how to debug them using dbxtool/debugger C 1 Basic Fortran Concepts and Commands Data types for the most part there will be only three basic
[PDF] Fortran Reference Guide - PGI Compilers
Fortran 95 Handbook Complete ISO/ANSI Reference, Adams et al, The MIT Press , Cambridge, Mass, 1997 ‣ Fortran 2003 Handbook, The Complete Syntax,
[PDF] Fortran - OpenMP
3 fév 2014 · OpenMP 4 0 API Fortran Syntax Quick Reference Card Fortran OpenMP parallel programming in C/C++ and Fortran on all architectures
[PDF] 01 Fortran first Introductionkey
Fortran 2008 - Compiler support is patchy but some useful features We have a cheat sheet that will help you read the older code if you Fortran IF syntax
[PDF] Fortran 77 Language Reference Manual
overview of the Fortran input/output statements and lists the syntax, rules, and Fortran 77 Language Reference Manual − Chapter 1, Fortran Elements and
[PDF] Fortran 90 Handbook
The complete syntax of Fortran 90 may be found in Appendix B The syntax cross reference that lists, for each nonterminal syntactic term, the number of
[PDF] A Fortran Primer And Cheat Sheet - Unhaggle
And Cheat Sheet - tuovideo itA F ortran Primer: (and cheat sheet)A Fortran Primer And Cheatfortran syntax cheat sheet - Market2MarketersA Fortran Primer: (
pdf A Fortran Primer: (and cheat sheet) - University of Alberta
Fortran Primer: (and cheat sheet) This section will provide a basic intro to most of the commonly occuring features of Fortran that you will need for the course This list is by no means exhaustive but it should be enough to get you where you need to go
A Fortran Primer: (and cheat sheet) - University of Alberta
C 1 Basic Fortran Concepts and Commands Data types for the most part there will be only three basic types of data you will have to deal with integers floating point numbers and characters In fortran these data types are declared as integer exact whole numbers (-3 0 5 234) usually stored in 4 bytes
A Fortran Tutorial - University of Utah
ANSI Fortran 77 then it will run on any computer that has a Fortran 77 compiler Thus Fortran programs are portable across computer platforms 2 Fortran 77 Basics A Fortran program is just a sequence of lines of text The text has to follow a certain syntax to be a valid Fortran program
Searches related to fortran syntax cheat sheet
1 Data Types 1 1 Simple Data Types integer(specs)[attrs] :: i integer real(specs)[attrs] :: r complex(specs)[attrs] :: z logical(specs)[attrs] :: b character(specs)[attrs] :: s real parameter :: c = 2 9e1 real(idp) :: d; d = 1 0d0 s2=s(2:5); s2=s(:5); s2=s(5:)
[PDF] fortran tutorial pdf
[PDF] fortunately synonym
[PDF] forum des halles paris öffnungszeiten
[PDF] forum examen professionnel inspecteur des finances publiques
[PDF] foss mixtures and solutions module answer key
[PDF] foss mixtures and solutions teacher guide
[PDF] foundation mathematics for computer science a visual approach
[PDF] foundation of data science berkeley
[PDF] four skills of language learning
[PDF] fourier series applications in real life
[PDF] fourier series coefficients calculator wolfram
[PDF] fourier series graphing calculator
[PDF] fourier series important questions and solutions pdf
[PDF] fourier series neither odd nor even
Modern Fortran Reference Card
(c) 2014 Michael GoerzThis work is licensed under the Creative Commons
Attribution-Noncommercial-Share Alike 3.0 License. To view a copy of this license, visithttp://creativecommons.org/licenses/by-nc-sa/1 Data Types
1.1 Simple Data Types
integer(specs)[,attrs]:: iinteger real(specs)[,attrs]:: rreal number complex(specs)[,attrs]:: zcomplex number logical(specs)[,attrs]:: bboolean variable character(specs)[,attrs]:: sstring real, parameter :: c = 2.9e1constant declaration real(idp) :: d; d = 1.0d0double precision real s2=s(2:5); s2=s(:5); s2=s(5:)substring extraction attributes:parameter, pointer, target, allocatable, dimension, public, private, intent, optional, save, external, intrinsic specs:kind=...,for character:len=... double precision:integer, parameter :: idp = kind(1.0d0)1.2 Derived Data Types
type persontdefine derived data type character(len=10) :: name integer :: age end type persont type groupt type(persont),allocatable &F2008: allocatable ... & :: members(:)...components end type groupt name = group%members(1)%nameaccess structure component1.3 Arrays and Matrices
real :: v(5)explicit array, index 1..5 real :: a(-1:1,3)2D array, index -1..1, 1..3 real, allocatable :: a(:)"deferred shape" array a=(/1.2,b(2:6,:),3.5/)array constructor v = 1/v + a(1:5,5)array expression allocate(a(5),b(2:4),stat=e)array allocation dealloate(a,b)array de-allocation1.4 Pointers
(avoid!) real, pointer :: pdeclare pointer real, pointer :: a(:)"deferred shape" array real, target :: rdefine target p => rset pointer p to r associated(p,[target])pointer assoc. with target? nullify(p)associate pointer with NUL1.5 Operators
.lt. .le. .eq. .ne. .gt. .ge.relational operators < <= == /= > >=relational op aliases .not. .and. .or. .eqv. .neqv.logical operators x**(-y)exponentiation "AB"//"CD"string concatenation2 Control Constructs if(...)actionif statement if(...) thenif-construct block else if (...) then;block else;block end if select case(number)select-construct case (:0)everything up to 0 (incl.) block case (1:2);blocknumber is 1 or 2 case (3);blocknumber is 3 case (4:);blockeverything up from 4 (incl.) case default;blockfall-through case end select outer:docontrolled do-loop inner: do i=from,to,stepcounter do-loop if (...) cycle innernext iteration if (...) exit outerexit from named loop end do inner end do outer do while(...);block;end dodo-while loop3 Program Structure
programmyprogmain program use foo, lname => usenameused module, with rename use foo2, only:[only-list]selective use implicit nonerequire variable declaration interface;...;end interfaceexplicit interfaces specification-statementsvar/type declarations etc. exec-statementsstatements stop "message"terminate program contains internal-subprogramssubroutines, functions end program myprog modulefoomodule use barused module public :: f1, f2, ...list public subroutines privatemake private by default interface;...;end interfaceexplicit interfaces specification statementsvar/type declarations, etc. contains internal-subprograms"module subprograms" end module foo functionf(a,g) result rfunction definition real, intent(in) :: ainput parameter real :: rreturn type interfaceexplicit interface block real function g(x)dummy vargis function real, intent(in) :: x end function g end interface r = g(a)function call end function f recursive function f(x) ...allow recursionelemental function f(x) ...work on args of any ranksubroutines(n,i,j,a,b,c,d,r,e)subroutine definition
integer, intent(in) :: nread-only dummy variable integer, intent(inout) :: iread-write dummy variable integer, intent(out) :: jwrite-only dummy variable real(idp) :: a(n)explicit shape dummy array real(idp) :: b(2:,:)assumed shape dummy array real(idp) :: c(10,*)assumed size dummy array real, allocatable :: d(:)deferred shape (F2008) character(len=*) :: rassumed length string integer, optional :: eoptional dummy variable integer :: m = 1same asinteger,save::m=1 if (present(e)) ...presence check returnforced exit end subroutine s call s(1,i,j,a,b,c,d,e=1,r="s")subroutine call