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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.4.4 Character SubstringA character substring is a contiguous portion of a character variable and is of type character. Acharacter substring can be referenced, assigned values and named. It can take either of thefollowing forms:character_variable_name(x1:x2)character_array_name(subscripts)(x1:x2)where x1 and x2 are integers and x1 denotes the left-hand character position and x2 the right-handone. These are known as substring expressions. In substring expressions x1 must be both greaterthan or equal to 1 and less than x2 and x2 must be less than or equal to the length of the charactervariable or array element.For example:J(2:4)the characters in positions 2 to 4 of character variable J.K(3,5)(1:4)the characters in positions 1 to 4 of array element K(3,5).A substring expression can be any valid integer expression and may contain array elements orfunction references.2.5 Fortran Pointers and TargetsFortran pointers are similar to allocatable arrays. Pointers are declared with a type and a rank; theydo not actually represent a value, however, but represent a value's address. Fortran 90/95 has aspecific assignment operator, =>, for use in pointer assignments.2.6 Fortran Binary, Octal and HexadecimalConstantsThe <strong>PGI</strong> Fortran compilers support two representations for binary, octal, and hexadecimalnumbers: the standard Fortran 90/95 representation and the <strong>PGI</strong> extension representation. Refer tothe next section for details on the alternate representation.Fortran supports binary, octal and hexadecimal constants in DATA statements. The form of abinary constant is:Fortran Data Types 41

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

Saved successfully!

Ooh no, something went wrong!