MIN Is an Undocumented Function

Product Version(s): 3.3x
Operating System:   MS-DOS
Flags: ENDUSER | TAR51923
Last Modified: 30-SEP-1988    ArticleIdent: Q10992

Question:

In a program we declare the global variable "MIN". When we link the
program we get a "symbol defined twice" error message. Is there a
procedure MIN that is used by the compiler?

Response:

It is not a reserved word, but it is an undocumented function defined
in the library. The library function min() does just what you would
expect; it returns the minimum of its two arguments. However, the
argument type and return type are WORD rather than INTEGER. Thus, the
following declaration should be made:

FUNCTION MIN(I,J: word): integer; extern;

There is no function MAX() defined in the library.

