lua-users home
lua-l archive

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


on 2/28/05 8:32 AM, David Jones at drj@pobox.com wrote:

> Show me some code that might use math.nan.  if x == math.nan ?  I don't
> think so.

    x = 0
    for index = 1, 100 do
        x = x + ( t[ index ] or math.nan )
    end

Any missing indices will result in a sum of NaN.

Mark