macros with parameters in MSC 5.0

Karl Heuer karl at haddock.ISC.COM
Fri Feb 19 04:01:18 AEST 1988


In article <11879 at brl-adm.ARPA> jbaker at ee.UCLA.EDU (Joe Baker) writes:
>  #define ctl(c) ('c'&037)
>... is not allowed in MSC5.0

Nor in ANSI C.

>What is the Right Way to do this?

Change the definition to "#define ctl(c) ((c)&037)" and write "ctl('P')"
rather than "ctl(P)".  You may also want to change the name, in case you
overlook some references.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list