macros with parameters in MSC 5.0

Alan J Rosenthal flaps at csri.toronto.edu
Sun Feb 21 08:35:16 AEST 1988


In article <11879 at brl-adm.ARPA> jbaker at ee.UCLA.EDU (Joe Baker) writes:
>#define ctl(c) ('c'&037)
...
>I have come up with some ugly fixes, but would like to know: what is
>the Right Way to do this?

how about
    #define ctl(c)((c) & 31)
and call it as
    ctl('a')

-- 
"noalias considered sailaon"



More information about the Comp.lang.c mailing list