12.07.2015 Views

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

PGI Fortran - Servidor WWW del Cluster Ladon-Hidra

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1 Language OverviewThis chapter describes the basic elements of the Fortran language, the format of Fortranstatements, and the types of expressions and assignments accepted by the <strong>PGI</strong> Fortran compilers.The PGF77 compiler accepts as input FORTRAN 77 and produces as output assembly languagecode, binary object code or binary executables in conjunction with the assembler, linker andlibraries on the target system. The input language must be extended FORTRAN 77 as specified inthis reference manual. The PGF95 and PGHPF compilers function similarly for Fortran 90/95and HPF respectively.This chapter is not an introduction to the overall capabilities of Fortran. Rather, it is an overviewof the syntax requirements of programs used with the <strong>PGI</strong> Fortran compilers. The Fortran 95Handbook and The High Performance Fortran Handbook provide details on the capabilities ofFortran 90/95 and HPF languages.1.1 Elements of a Fortran Program UnitA Fortran program is composed of SUBROUTINE, FUNCTION, MODULE, BLOCK DATA, orPROGRAM program units.Fortran source code consists of a sequence of program units which are to be compiled. Everyprogram unit consists of statements and optionally comments beginning with a program unitstatement, either a SUBROUTINE, FUNCTION, or PROGRAM statement, and finishing with anEND statement (BLOCK DATA and MODULE program units are also allowed).In the absence of one of these statements, the <strong>PGI</strong> Fortran compilers insert a PROGRAMstatement.1.1.1 StatementsStatements are either executable statements or nonexecutable specification statements. Eachstatement consists of a single line or source record, possibly followed by one or more continuationlines. Multiple statements may appear on a single line if they are separated by a semicolon (;).Comments may appear on any line following a comment character (!).Language Overview 12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!