www.delorie.com/gnu/docs/gcc/g77_287.html   search  
 
Buy the book!


Using and Porting GNU Fortran

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.11.9.212 RealPart Intrinsic

 
RealPart(Z)

RealPart: REAL function, the `KIND=' value of the type being that of argument Z.

Z: COMPLEX; scalar; INTENT(IN).

Intrinsic groups: gnu.

Description:

The real part of Z is returned, without conversion.

Note: The way to do this in standard Fortran 90 is `REAL(Z)'. However, when, for example, Z is COMPLEX(KIND=2), `REAL(Z)' means something different for some compilers that are not true Fortran 90 compilers but offer some extensions standardized by Fortran 90 (such as the DOUBLE COMPLEX type, also known as COMPLEX(KIND=2)).

The advantage of REALPART() is that, while not necessarily more or less portable than REAL(), it is more likely to cause a compiler that doesn't support it to produce a diagnostic than generate incorrect code.

See section 8.11.5 REAL() and AIMAG() of Complex, for more information.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003