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.

These examples require that the programmer use a PARAMETER statement to define kinds:INTEGER, PARAMETER :: SHORT=1INTEGER HIGHPARAMETER (HIGH=8)The following table shows several examples of KINDs that a system could support.Table 2-1: Fortran Intrinsic Data TypesData TypeINTEGERREALDOUBLEPRECISIONLOGICALCOMPLEXCHARACTERAn integer number.A real number.ValueA double precision floating point number, real number,taking up two numeric storage units and whose precisionis greater than REAL.A value which can be either TRUE or FALSE.A pair of real numbers used in complex arithmetic.Fortran provides two precisions for COMPLEXnumbers.A string consisting of one or more printable characters.Table 2-2: Data Types Kind ParametersType Kind SizeINTEGER SHORT 1 byteINTEGER LONG 4 bytesREAL HIGH 8 bytes2.1.2 Number of Bytes SpecificationThe <strong>PGI</strong> Fortran compilers support a length specifier for some data types. The data type can befollowed by a data type length specifier of the form *s, where s is one of the supported lengths forthe data type. Such a specification overrides the length attribute that the statement implies andassigns a specific length to the specified item, regardless of the compiler options. For example,REAL*8 is equivalent to DOUBLE PRECISION. The following table shows the lengths of datatypes, their meanings, and their sizes.32 Chapter 2

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

Saved successfully!

Ooh no, something went wrong!