# Fortran 2008 Features

The following Fortran 2008 features are new in this release:

- Specification expressions can now contain user-defined operators.

- Direct access user-defined I/O has been implemented.

The following Fortran 2008 features are also supported:

- The FINDLOC intrinsic function

- You can specify optional argument BACK in MAXLOC and MINLOC intrinsic functions.

- You can declare multiple type-bound procedures in a PROCEDURE list.

- Intrinsic assignment to an allocatable polymorphic variable is allowed if the variable is not a coarray. For more information, see Examples of Intrinsic Assignment to Polymorphic Variables.

- The intrinsic module functions COMPILER_OPTIONS and COMPILER_VERSION

- Subscripts and nested implied-DO limits in a data statement can be any constant expression instead of being limited to combinations of constants, implied-DO variables, and intrinsic operations.

- The intrinsic functions ACOS, ACOSH, ASIN, ASINH, ATAN, ATANH, COSH, SINH, TAN, and TANH now take arguments of type COMPLEX. The intrinsic function ATAN (Y, X) is defined as ATAN2 (Y, X).

- A pointer dummy argument with INTENT(IN) can be argument associated with a non-pointer actual argument with the TARGET attribute.

- A reference to a function that returns a data pointer is treated as a variable and is permitted in any variable-definition context .

- Allocatable components are allowed to be of recursive type, that is, the type being defined, or of a forward type, that is, a derived type that is not yet defined.

- In an ALLOCATE statement, you can specify more than one allocate object for a given SOURCE= or MOLD=. Also, if you do not specify upper and lower bounds in an ALLOCATE statement's s-spec list, the shape of the array is that of SOURCE=source-expr or MOLD=source-expr.

- Initialization expressions are now referred to as constant expressions.

- An EXIT statement can appear in a BLOCK, IF, ASSOCIATE, SELECT CASE, or SELECT TYPE construct.

- You can specify intrinsic types in a TYPE statement

- You can specify implied-shape array specifications for named constant arrays

- You can specify %re and %im designators for the real and imaginary parts of values of COMPLEX type

- Pointer Initialization

- Binary, octal, and hexadecimal constants are allowed for one or more arguments in intrinsic routines BGE, BGT, BLE, BLT, CMPLX, DBLE, DSHIFTL, DSHIFTR, IAND, IEOR, INT, IOR, MERGE_BITS, and REAL.

- You can specify an optional integer datatype for the subscript-name in the triplet-spec in the FORALL statement.

- An ALLOCATE statement can give a polymorphic variable the shape and type of another variable without copying the value. This is done with MOLD= replacing SOURCE=.

- Except for procedure arguments and pointer dummy arguments, a PURE function may have a dummy argument with the VALUE attribute without the explicit INTENT(IN) attribute.

- Dummy arguments of ELEMENTAL procedures may appear in specification expressions in the procedure.

- You can specify an optional RADIX argument for the intrinsic function SELECTED_REAL_KIND and the intrinsic module procedure IEEE_SELECTED_REAL_KIND.

- Submodules

- IMPURE keyword

- The EXECUTE_COMMAND_LINE subroutine

- The BLOCK construct

- The FUNCTION and SUBROUTINE keywords on the END statement are optional for internal procedures and module procedures.

- A negative value that is not zero but rounds to zero on output is displayed with a leading minus sign

- Generic resolution of procedures where one dummy argument has the ALLOCATABLE attribute and the other has the POINTER attribute without INTENT (IN), or where one is a procedure and the other is a data object.

- The ENTRY statement is an obsolescent feature.

- A source statement can begin with one or more semicolon characters.

- Coarray intrinsic routines: ATOMIC_DEFINE and ATOMIC_REF

- A polymorphic MOLD= specifier for ALLOCATE

- Coarrays (Windows* and Linux* only)

- Image control statements: SYNC ALL, SYNC IMAGES, SYNC MEMORY, CRITICAL, LOCK, and UNLOCK

- Coarray intrinsic routines: IMAGE_INDEX, LCOBOUND, NUM_IMAGES, THIS_IMAGE, and UCOBOUND

- CRITICAL construct

- Maximum array rank of 15 (Intel® Fortran allows 31 dimensions)

- G0 and G0.d format edit descriptors

- FINAL routines

- GENERIC, OPERATOR, and ASSIGNMENT overloading in type-bound procedures

- A generic interface may have the same name as a derived type

- Bounds specification and bounds remapping list on a pointer assignment

- In formatting, a * indicates an unlimited repeat count

- NEWUNIT= specifier in OPEN

- A CONTAINS section can be empty

- Attributes CODIMENSION and CONTIGUOUS

- Coarrays can be specified in ALLOCATABLE, ALLOCATE, and TARGET statements

- MOLD keyword in ALLOCATE

- DO CONCURRENT statement

- ERROR STOP statement

- Intrinsic functions BESSEL_J0, BESSEL_J1, BESSEL_JN, BESSEL_Y0, BESSEL_Y1, BESSEL_YN, BGE, BGT, BLE, BLT, DSHIFTL, DSHIFTR, ERF, ERFC, ERFC_SCALED, GAMMA, HYPOT, IALL, IANY, IPARITY, IS_CONTIGUOUS, LEADZ, LOG_GAMMA, MASKL, MASKR, MERGE_BITS, NORM2, PARITY, POPCNT, POPPAR, SHIFTA, SHIFTL, SHIFTR, STORAGE_SIZE, TRAILZ

- ISO_FORTRAN_ENV module constants ATOMIC_INT_KIND, ATOMIC_LOGICAL_KIND, CHARACTER_KINDS, INTEGER_KINDS, INT8, INT16,INT32, INT64, LOGICAL_KINDS, REAL_KINDS, REAL32, REAL64, REAL128, STAT_LOCKED, STAT_LOCKED_OTHER_IMAGE, STAT_UNLOCKED

- ISO_FORTRAN_ENV type LOCK_TYPE

- SCALAR keyword for ALLOCATED

For information about the Fortran standards, visit the Fortran Standards Committee website.

Parent topic: Conformance, Compatibility, and Fortran Features

## See Also

New Language Features
Fortran 2003 Features
Fortran 2018 Features