Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 9/08/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

SELECTED_INT_KIND

Transformational Intrinsic Function (Generic): Returns the value of the kind parameter of an integer data type.

result = SELECTED_INT_KIND (r)

r

(Input) Must be scalar and of type integer.

Results

The result is a scalar of type default integer. The result has a value equal to the value of the kind parameter of the integer data type that represents all values n in the range of values n with -10 r< n < 10 r.

If no such kind type parameter is available on the processor, the result is -1. If more than one kind type parameter meets the criteria, the value returned is the one with the smallest decimal exponent range. For more information, see Model for Integer Data.

Example

SELECTED_INT_KIND (6) = 4

The following shows another example:

 i = SELECTED_INT_KIND(8)  ! returns 4
 i = SELECTED_INT_KIND(3)  ! returns 2
 i = SELECTED_INT_KIND(10) ! returns 8
 i = SELECTED_INT_KIND(20) ! returns -1 because 10**20
                           !   is bigger than 2**63