🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #191

min, max, and ANSI

#191
From: Kevin R. Coombes
Date: Thu, 09 Apr 1992 16:58
10 lines
1004 bytes
I have a question about the ANSI C header stdlib.h. A certain compiler that
shall for the moment remain nameless includes macros for min(a,b) and 
max(a,b) in <stdlib.h>. Consequently, I managed to lose several hours
trying to find out why a working program suddenly broke---eventually
discovering, of course, that I had been using min as the name of a variable,
and had changed things hwen I #included <stdlib.h> for unrelated reasons.
Are min and max SUPPOSED to be in stdlib.h, and have I been just lucky
in avoiding this problem in the past?

Kevin Coombes <krc@math.umd.edu>
Technical Details
Message-ID: <1992Apr9.165859.18578@wam.umd.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!wam.umd.edu!krc

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c,comp.std.c++
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!wam.umd.edu!krc
From: krc@wam.umd.edu (Kevin R. Coombes)
Subject: min, max, and ANSI
Message-ID: <1992Apr9.165859.18578@wam.umd.edu>
Originator: krc@rac1.wam.umd.edu
Sender: usenet@wam.umd.edu (USENET News system)
Nntp-Posting-Host: wam.umd.edu
Organization: University of Maryland at College Park
Date: Thu, 9 Apr 1992 16:58:59 GMT