SELECTED_INT_KIND

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

Syntax

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 -10r < n < 10r.

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.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: SELECTED_REAL_KIND

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 -1, precision
                           ! not available for this type