9.229 REAL — Convert to real type
- Description:
 - 
REAL(A [, KIND])converts its argument A to a real type. TheREALPARTfunction is provided for compatibility withg77, and its use is strongly discouraged. - Standard:
 - 
Fortran 77 and later
 - Class:
 - 
Elemental function
 - Syntax:
 - 
RESULT = REAL(A [, KIND])RESULT = REALPART(Z) - Arguments:
 - 
A Shall be INTEGER,REAL, orCOMPLEX.KIND (Optional) An INTEGERinitialization expression indicating the kind parameter of the result. - Return value:
 - 
These functions return a
REALvariable or array under the following rules:- (A)
 REAL(A)is converted to a default real type if A is an integer or real variable.- (B)
 REAL(A)is converted to a real type with the kind type parameter of A if A is a complex variable.- (C)
 REAL(A, KIND)is converted to a real type with kind type parameter KIND if A is a complex, integer, or real variable.
 - Example:
 - 
program test_real complex :: x = (1.0, 2.0) print *, real(x), real(x,8), realpart(x) end program test_real
 - Specific names:
 - 
Name Argument Return type Standard FLOAT(A)INTEGER(4)REAL(4)Fortran 77 and later DFLOAT(A)INTEGER(4)REAL(8)GNU extension FLOATI(A)INTEGER(2)REAL(4)GNU extension FLOATJ(A)INTEGER(4)REAL(4)GNU extension FLOATK(A)INTEGER(8)REAL(4)GNU extension SNGL(A)INTEGER(8)REAL(4)Fortran 77 and later  - See also:
 
Next: RENAME, Previous: RANK, Up: Intrinsic Procedures [Contents][Index]
    © Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
    https://gcc.gnu.org/onlinedocs/gcc-9.3.0/gfortran/REAL.html