Infinite loops

KW Heuer kwh at bentley.UUCP
Tue May 6 23:43:45 AEST 1986


In article <390 at hadron.UUCP> hadron!jsdy (Joseph S. D. Yao) writes:
>BTW, given all these defines:  here are some "cute" ones of mine: ...
>#define streq(a,b)     (strcmp(a, b) == OK)

A more general mechanism is
#define strrel(a,R,b)	(strcmp(a, b) R 0)
which allows you to write strrel(a,==,b).  Some consider this to be abuse
of the preprocessor.



More information about the Comp.lang.c mailing list