🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #192

Re: min, max, and ANSI

#192
From: carleton walker `93
Date: Thu, 09 Apr 1992 20:04
22 lines
1436 bytes
In article <1992Apr9.165859.18578@wam.umd.edu> krc@wam.umd.edu (Kevin R. Coombes) writes:
>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?

	I've always used the MIN and MAX in <mp.h>. I took a peak in
<stdlib.h> and couldn't find a MIN or MAX function. Do you include
<mp.h>?


Carl Walker

--
Carl Walker				"Hectic days ahead of us,
Bucknell University			 Rotten ones behind,
Lewisburg, PA				 Keeping plastics in our pockets,
					 Children never mind." - K, S, & W
Technical Details
Message-ID: <1324@hydra.bucknell.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mips!darwin.sura.net!ukma!psuvax1!hydra!albiero!cwalker
References: <1992Apr9.165859.18578@wam.umd.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!mips!darwin.sura.net!ukma!psuvax1!hydra!albiero!cwalker
From: cwalker@albiero.tmc.edu (carleton walker `93)
Newsgroups: comp.std.c,comp.std.c++
Subject: Re: min, max, and ANSI
Message-ID: <1324@hydra.bucknell.edu>
Date: 9 Apr 92 20:04:53 GMT
References: <1992Apr9.165859.18578@wam.umd.edu>
Sender: news@hydra.bucknell.edu
Organization: Bucknell University, Lewisburg, Pa.
Lines: 22