bge(x, y):按位小于或等于

按位小于或等于。

声明

语法

retval = ble(x, y);
elemental logical function ble(x, y)

参数

x 和 y 是整数输入值。两个输入值是同一类型的。

返回值

返回值是逻辑类型和默认类型。

描述

ble(x, y) 计算一个整数输入值是否按位小于或等于另一个。

类型

支持的输入类型是 32 位和 64 位大小的整数。

interface ble
    module procedure ble32, ble64
end interface

contains

interface
    elemental logical function ble32(x, y)
	integer(int32), intent(in) :: x, y
	end function

    elemental logical function ble64(x, y)
	integer(int64), intent(in) :: x, y
	end function
end interface

示例

program intrinsics_ble
    implicit none
    print *, ble(10, 4)
	print *, ble(10, -4)
	print *, ble(10, 10)
end program

结果:

false
true
true

也可以看看

bgt, bge, blt.