By Walter S. Brainerd
A primary functional consultant to Fortran ninety by means of individuals of the X3J3 Committee. this can be a educational on Fortran ninety for programmers and engineers and scientists who paintings with Fortran seventy seven and wish to benefit the seriously revised criteria supplied for in Fortran ninety. lined during this advisor to programming languages are easy ideas, uncomplicated programming workouts, various examples and difficulties. Written through 4 senior participants of the ANSI Fortran criteria Committee X3J3, this publication serves as a brief resource of knowledge for working towards pros.
Read Online or Download A Programmer's Guide to Fortran 90 PDF
Similar compilers books
This ebook offers an outline of the main primary elements of the idea that underlies the Relational Database version. As such it truly is self-contained even though adventure with formal versions and summary information manipulating at the one hand and with the sensible use of a relational method nonetheless might help the reader.
Fortran is among the most generally used programming languages in technological know-how and engineering. Fortran ninety changed the outdated FORTRAN seventy seven in 1991 and this contemporary model of the overseas common complements this model. it's also numerous new good points to make sure that Fortran is still aligned with excessive functionality Fortran (HPF) for parallel desktop architectures.
- The New PL/I: … for PC, Workstation and Mainframe
- An Introduction to Language Processing with Perl and Prolog: An Outline of Theories, Implementation, and Application with Special Consideration of English, French, and German (Cognitive Technologies)
- Exploring C for Microcontrollers: A Hands on Approach
- Report on the Algorithmic Language ALGOL 68
- Optimizing compilers for modern architectures; a dependence based approach
Extra resources for A Programmer's Guide to Fortran 90
Shape(/5,5/) and scalar ra = rb + rc*id ! Shape(/3,2/) ra(3:5,3:4) = rb(1::2,3:5:2) + rc(1:3,1:2) ! 7 Recursion It is important to be aware of how to achieve recursion in Fortran 90: For example, the code: DO i=2,n x(i) = x(i) + x(i-1) END DO is not the same as: x(2:n)= x(2:n) + x(1:n-1) In the first case, the assignment is: x(i) = x(i) + x(i-1) + x(i-2) + ... + x(1) whereas in the second case the assignment is: x(i) = x(i) + x(i-1) In order to achieve the recursive effect of the DO-loop, in Fortran 90 it would be appropriate to use the intrinsic function SUM.
Find the maximum value less than 1000 in this array. In Fortran 77 this requires triple DO loop and IF statements, whereas the Fortran 90 code is: REAL, DIMENSION(10,10,10) :: a amax=MAXVAL(a,MASK=(a<1000)) Note the use of the optional MASK argument. MASK is a logical array expression. Only those elements of a that correspond to elements of MASK that have the value true take part in the function call. So in this example amax is the value of the maximum element in a which is less than 1000. 4. Find the average value greater than 3000 in an array.
Shape (5, 5) ! = REAL, DIMENSION (0:4,2:6) :: rc . . END SUBROUTINE sub The calling program might include: REAL, DIMENSION (0:9,10) :: ra ! Shape (10, 10) INTERFACE SUBROUTINE sub(ra,rb,rc) REAL, DIMENSION(:,:), INTENT(IN) :: ra,rb REAL, DIMENSION(0:,2:), INTENT(OUT) :: rc END SUBROUTINE sub END INTERFACE . . : PROGRAM array IMPLICIT NONE REAL, ALLOCATABLE, DIMENSION(:,:) :: a REAL :: res INTEGER :: n1 INTERFACE SUBROUTINE sub(a,res) REAL, DIMENSION(:, :), INTENT(IN) :: a REAL, DIMENSION(SIZE(a, 1),SIZE(a, 2)) :: work END SUBROUTINE sub END INTERFACE ...
A Programmer's Guide to Fortran 90 by Walter S. Brainerd