compare strings, strcmp

Blair P. Houghton bph at buengc.BU.EDU
Sat Nov 18 10:22:04 AEST 1989


In article <5221 at mentor.cc.purdue.edu> aic at 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.  :-)"



More information about the Comp.lang.c mailing list