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.

2 Fortran Data TypesEvery Fortran element and expression has a data type. The data type of an element may be implicitin its definition or explicitly attached to the element in a declaration statement. This chapterdescribes the Fortran data types and constants that are supported by the <strong>PGI</strong> Fortran compilers.Fortran 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 from theintrinsic data types are called derived types.2.1 Intrinsic Data TypesFortran provides six different intrinsic data types as shown in Table 2-1. Table 2-2 and Table 2-3show variations and different "kinds" of the intrinsic data types supported by the <strong>PGI</strong> Fortrancompilers.2.1.1 Kind ParameterThe Fortran 95 KIND parameter specifies a precision for intrinsic data types. The KIND parameterfollows a data type specifier and specifies size or type of the supported data type. A KINDspecification overrides the length attribute that the statement implies and assigns a specific lengthto the item, regardless of the compiler's command-line options. A KIND is defined for a data typeby a PARAMETER statement, using sizes supported on the particular system.The following are some examples using a KIND specification:INTEGER (SHORT) :: LREAL (HIGH) BREAL (KIND=HIGH) XVAR, YVARFortran Data Types 31

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

Saved successfully!

Ooh no, something went wrong!