-qintlog

Category

Floating-point and integer control

Purpose

Specifies that you can mix integer and logical data entities in expressions and statements.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-nointlog-.   
>>- -q--+-intlog---+-------------------------------------------><

@PROCESS:

@PROCESS INTLOG | NOINTLOG

Defaults

-qnointlog

Usage

When -qintlog is specified, logical operators that you specify with integer operands act upon those integers in a bit-wise manner, and integer operators treat the contents of logical operands as integers.

The following operations do not allow the use of logical variables:
  • ASSIGN statement variables
  • Assigned GOTO variables
  • DO loop index variables
  • Implied-DO loop index variables in DATA statements
  • Implied-DO loop index variables in either input and output or array constructors
  • Index variables in FORALL constructs

You can also use the intrinsic functions IAND, IOR, IEOR, and NOT to perform bitwise logical operations.

The MOVE_ALLOC intrinsic function cannot take one integer and one logical argument.

Examples

INTEGER I, MASK, LOW_ORDER_BYTE, TWOS_COMPLEMENT
I = 32767
MASK = 255
! Find the low-order byte of an integer.
LOW_ORDER_BYTE = I .AND. MASK
! Find the twos complement of an integer.
TWOS_COMPLEMENT = (.NOT. I) + 1
END

Related information