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

按位大于或等于。

声明

语法

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

参数

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

返回值

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

描述

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

类型

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

interface bge
    module procedure bge32, bge64
end interface

contains

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

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

示例

program intrinsics_bge
    implicit none
    print *, bge(10, 4)
	print *, bge(10, -4)
	print *, bge(10, 10)
end program

结果:

true
false
true

也可以看看

bgt,ble,blt。