Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!dptg!pegasus!psrc From: psrc@pegasus.ATT.COM (Paul S. R. Chisholm) Newsgroups: comp.lang.c++ Subject: Re: Zortech C++ V1.07 serious bug Summary: It looks like the example program has the bug Keywords: C++ DOS OS/2 Zortech bug Message-ID: <4094@pegasus.ATT.COM> Date: 15 Sep 89 04:05:56 GMT References: <13629@well.UUCP> Organization: AT&T Bell Laboratories Lines: 16 In article <13629@well.UUCP>, nagle@well.UUCP (John Nagle) writes: > int min(int x, int y) { (x int max(int x, int y) { (x>y) ? x : y; } That's the problem. C++ inline functions aren't macros. True, many compilers wil effectively return the last expression evaluated, and it would be nice if Zortech warned you that the functions consisted only of statements with no effect. But your code really needs to say what it means: int min(int x, int y) { return (xy) ? x : y; } Paul S. R. Chisholm, AT&T Bell Laboratories att!pegasus!psrc, psrc@pegasus.att.com, AT&T Mail !psrchisholm I'm not speaking for the company, I'm just speaking my mind.