signbit.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 38 行

GML
38
字号
.func signbit
#include <math.h>
int signbit( x );
.funcend
.*
.desc begin
The &func macro determines whether the sign of its argument value is negative.
.np
The argument
.arg x
must be an expression of real floating type.
.desc end
.*
.return begin
The &func macro returns a nonzero value if and only if the sign of its
argument has value is negative.
.return end
.*
.see begin
.im seefpcls signbit
.see end
.*
.exmp begin
#include <math.h>
#include <stdio.h>
.exmp break
void main( void )
{
    printf( "-4.5 %s negative\n",
        signbit( -4.5 ) ? "is" : "is not" );
}
.exmp output
-4.5 is negative
.exmp end
.*
.class ANSI
.system

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?