Re: Help with structs
- From: Jack Trades <jacktradespublic@xxxxxxxxx>
- Date: Fri, 27 Aug 2010 20:32:47 -0700 (PDT)
On Aug 27, 10:22 pm, Seebs <usenet-nos...@xxxxxxxxx> wrote:
On 2010-08-28, Jack Trades <jacktradespub...@xxxxxxxxx> wrote:
On Aug 27, 12:27 am, Behind China Blue Eyes <chine.b...@xxxxxxxxx>
You can also flatten the switches with something like switchI'm not quite sure how this would work. Why multiply by 100?
(100*obj_1->type + obj_2->type).
Imagine that type runs from 1 to 50.
100*type1 + type2 will then run from 101 to 5050, with each
pair unique. And you can do things like:
case (TYPE_FLONUM * 100) + TYPE_FIXNUM:
case (TYPE_FIXNUM * 100) + TYPE_FLONUM:
/* handle fix/float pair */
OK. That makes perfect sense now.
- Prev by Date: Re: Help with structs
- Next by Date: Re: Help with structs
- Previous by thread: Re: Help with structs