lua-users home
lua-l archive

Re: compiler warnings in 5.1

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Dec 23, 2005 at 01:23:34AM +1100, David Burgess wrote:
> > What is wrong with a comma operator in an index? (Maybe someone may
> > think it is a matrix access, like a[i,j]?
> Yes. MS doco
> "An array index legally may be the value of the last expression in a
> series of expressions separated by the comma operator. However, the
> intent may have been to use the expressions to specify multiple
> indexes into a multidimensional array."
Could you wrap this in something like: ( (1) ? (..., ..., ...) : 0 )
It's ugly. Perhaps a macro:
#define _E(expr) (1?(expr):0)
Best,
-- 
Shannon Stewman | Let us walk through the waning night,
Caught in a whirlpool, | As dawn-rays tickle our toes, the dew soothes
A quartering act: | Our blistered soles, and damp bones stir
Solitude or society? | As crimson cracks under the blue-grey sky.

AltStyle によって変換されたページ (->オリジナル) /