comma operator: keep away?
David Dyer-Bennet
ddb at ns.network.com
Tue Apr 25 07:22:12 AEST 1989
In article <10098 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
:Ok, I picked a bad example. However, many macros need to accomplish
:more than one thing and cannot do so without the aid of some such
:trickery as
: ((expr1) & 0 | (expr2))
:which is more simply expressed as
: (expr1, expr2)
Which is an example of the weakness of the macro facility in C (one of the
most light-weight macro facilities I've ever had foisted on me). Without
taking a position on the general value of the comma operator -- the correct
solution to this one is to improve the macro facility, not provide a
way to kludge some (but not all) cases.
--
David Dyer-Bennet, ddb at terrabit.fidonet.org, or ddb at ns.network.com
or ddb at Lynx.MN.Org, ...{amdahl,hpda}!bungia!viper!ddb
or ...!{rutgers!dayton | amdahl!ems | uunet!rosevax}!umn-cs!ns!ddb
or Fidonet 1:282/341.0, (612) 721-8967 9600hst/2400/1200/300
More information about the Comp.lang.c
mailing list