Search

August 11, 2004
General »
...with(FooBarBaz) const FooBarBaz flags = THE | QUICK | BROWN | FOX;

        // C++-style
    with (FooBarBaz):
        const FooBarBaz...
August 11, 2004
General »
...shouldn't happen very often).

But then he loses his FooBarBaz type.

-----------------------
Carlos Santander Bernal

August 10, 2004
General »
...type int to FooBarBaz
  fooBar(FooBarBaz.ONE|FooBarBaz.TWO);
  fooBar(cast(FooBarBaz)BarBazFoo.ONE|BarBazFoo...
August 10, 2004
General »
...enum FooBarBaz {
  ONE,TWO
}

fooBar(ONE);

is not any more/less ambiguous than

fooBar(FooBarBaz...
August 10, 2004
General »
...FooBarBaz.THE|FooBarBaz.QUICK|FooBarBaz.BROWN|FooBarBaz.FOX|FooBarBaz.JUMP|FooBarBaz.OVER|FooBarBaz.THE|FooBarBaz...
August 10, 2004
General »
...enclose the bit you want with:

with(FooBarBaz)
{
/+ all your code you don't want...
August 10, 2004
General »
...don't want to have to type FooBarBaz 6 times.

I'm not suggesting abolishing...
August 10, 2004
General »
...0x0100
| }
|

You can do it like this:

typedef ushort FooBarBaz;
enum : FooBarBaz
{ ... }

-----------------------
Carlos Santander Bernal

August 10, 2004
General »
...FooBarBaz.THE|FooBarBaz.QUICK|FooBarBaz.BROWN|FooBarBaz.FOX|FooBarBaz.JUMP|FooBarBaz.OVER|FooBarBaz.THE|FooBarBaz...
1 2
Next ›   Last »