On Sat, 21 Apr 2001, Peter Ajamian wrote:
>I wonder why something so simple as MAX and MIN are using functions in
>the stock source, especially when you consider that by passing and
>returning an int you limit thier usefullness (you can't use them for long
>on 16 bit systems or unsigned long or long long or floating point types
>on any system). If macros were used instead such a limitation would not
>exist (not to mention it would be faster because the code would be
>inline).
Consider:
int a = MAX(b++, c);
The functions cause signed/unsigned problems but those can get compiler
warnings.
--
George Greer
greerga@circlemud.org
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/05/01 PST