min.gml

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

GML
36
字号
.func min
#include <stdlib.h>
#define min(a,b)  (((a) < (b)) ? (a) : (b))
.funcend
.desc begin
The &func macro will evaluate to be the lesser of two values.
It is implemented as follows.
.millust begin
#define min(a,b)  (((a) < (b)) ? (a) : (b))
.millust end
.desc end
.return begin
The &func macro will evaluate to the smaller of the two values passed.
.return end
.see begin
.seelist min max
.see end
.exmp begin
#include <stdio.h>
#include <stdlib.h>
.exmp break
void main()
  {
    int a;
.exmp break
    /*
     * The following line will set the variable "a" to 1
     * since 10 is greater than 1.
     */
    a = min( 1, 10 );
    printf( "The value is: %d\n", a );
  }
.exmp end
.class WATCOM
.system

⌨️ 快捷键说明

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