10.07.2015 Views

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

PGI Fortran Reference manual - The Portland Group

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.

Chapter 2.FORTRAN DATA TYPESEvery <strong>Fortran</strong> element and expression has a data type. <strong>The</strong> data type of an element may beimplicit in its definition or explicitly attached to the element in a declaration statement. Thissection describes the <strong>Fortran</strong> data types and constants that are supported by the <strong>PGI</strong> <strong>Fortran</strong>compilers.<strong>Fortran</strong> provides two kinds of data types, intrinsic data types and derived data types. Typesprovided by the language are intrinsic types. Types specified by the programmer and built fromthe intrinsic data types are called derived types.2.1. Intrinsic Data Types<strong>Fortran</strong> provides six different intrinsic data types, listed in Table 9 and Table 11 show variationsand different KIND of intrinsic data types supported by the <strong>PGI</strong> <strong>Fortran</strong> compilers.Table 9 <strong>Fortran</strong> Intrinsic Data TypesData TypeINTEGERREALDOUBLE PRECISIONLOGICALCOMPLEXCHARACTERValueAn integer number.A real number.A double precision floating point number, real number, taking up two numeric storage unitsand whose precision is greater than REAL.A value which can be either TRUE or FALSE.A pair of real numbers used in complex arithmetic. <strong>Fortran</strong> provides two precisions forCOMPLEX numbers.A string consisting of one or more printable characters.2.1.1. Kind Parameter<strong>The</strong> <strong>Fortran</strong> 95 KIND parameter specifies a precision for intrinsic data types. <strong>The</strong> KINDparameter follows a data type specifier and specifies size or type of the supported data type. AKIND specification overrides the length attribute that the statement implies and assigns a specific<strong>PGI</strong> <strong>Fortran</strong> <strong>Reference</strong> Guide 16

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

Saved successfully!

Ooh no, something went wrong!