macros with parameters in MSC 5.0

Arthur David Olson ado at elsie.UUCP
Mon Feb 29 05:23:18 AEST 1988


> > #define ctl(c) ('c'&037)
> > what is the Right Way to do this?  (under dpANS)
> 
> #define ctl(c)  ((* #c) & 037))

Not if you plan to use code such as
		switch (value) {
			case ctl(a):
				...
-- 
ado at vax2.nlm.nih.gov		ADO, VAX, and NIH are Ampex and DEC trademarks



More information about the Comp.lang.c mailing list