Path: utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!cica!iuvax!purdue!bu-cs!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: compare strings, strcmp Message-ID: <4946@buengc.BU.EDU> Date: 17 Nov 89 23:22:04 GMT References: <4463@blake.acs.washington.edu> <11605@smoke.BRL.MIL> <308@charyb.COM> <5205@mentor.cc.purdue.edu> <5221@mentor.cc.purdue.edu> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.lang.c Organization: Boston Univ. Col. of Eng. Lines: 18 In article <5221@mentor.cc.purdue.edu> aic@mentor.cc.purdue.edu (George A. Basar) writes: > > I blew it, apologies to all. No excuse given. This is not unsafe for the >application specified, though, which was a fixed array of strings(aasuming >a calling convention of StrEq(a[i],b[i])). In which case one of the more common calls people would try would be of the form StrEq( a[i++], b[j++] ) Thus allowing the macro to blow up. So it really still is a hazardous piece of programming, but very useful if you're careful to remember its characteristics. --Blair "Moral: Don't judge your own code. That's what we're here for. :-)"