Intel® Fortran Compiler

Developer Guide and Reference

ID 767251
Date 6/30/2025
Public

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

Document Table of Contents

SELECTED_LOGICAL_KIND

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

result = SELECTED_LOGICAL_KIND (bits)

bits

(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 logical data type whose storage size in bits is at least bits. If no such kind type parameter is available on the processor, the result is -1. If more than one kind parameter exists that meets the requirement, the kind parameter with the smallest storage size is returned.

Example

SELECTED_LOGICAL_KIND (6) = 1

The following shows another example:

i = SELECTED_LOGICAL_KIND(8)   ! returns 1
i = SELECTED_LOGICAL_KIND(16)  ! returns 2
i = SELECTED_LOGICAL_KIND(32)  ! returns 4
i = SELECTED_LOGICAL_KIND(64)  ! returns 8
I = SELECTED_LOGICAL_KIND(128) ! returns -1 because there is no logical kind
                                ! with a storage size of 128 bits