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.2.8 Character ConstantsCharacter string constants may be <strong>del</strong>imited using either an apostrophe (') or a double quote (").The apostrophe or double quote acts as a <strong>del</strong>imiter and is not part of the character constant. Usetwo apostrophes together to include an apostrophe as part of the expression. If a string begins withone variety of quote mark, the other may be embedded within it without using the repeated quoteor backslash escape. Within character constants, blanks are significant. For further information onthe use of the backslash character, refer to –Mbackslash in the <strong>PGI</strong> User’s Guide.A character constant is one of:[ kind-parameter_ ] "[characters]"[ kind-parameter_ ] '[characters]'Below are several examples of character constants.'abc''abc ''ab''c'"Test Word"GREEK_"µ••"A zero length character constant is written as '' or "".If a character constant is used in a numeric context, for example as the expression on the right sideof an arithmetic assignment statement, it is treated as a Hollerith constant. The rules for typing andsizing character constants used in a numeric context are described in Section 2.7, HollerithConstants.2.2.9 PARAMETER ConstantsThe PARAMETER statement permits named constants to be defined. Refer to the description ofthe PARAMETER statement found in Chapter 3, Fortran Statements for more details on definingconstants.2.3 Derived TypesA derived type is a type made up of components whose type is either intrinsic or another derivedtype. The TYPE and END TYPE keywords define a derived type. For example, the followingderived type declaration defines the type PERSON and the array CUSTOMER of type PERSON:! Declare a structure to define a person derived typeTYPE PERSONINTEGER IDLOGICAL LIVING38 Chapter 2

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

Saved successfully!

Ooh no, something went wrong!