lua-users home
lua-l archive

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


"1.#INF" is the result of tostring(1 / 0)
1.#INF (without quotes) is not a valid numeric constant ("A numerical
constant may be written with an optional decimal part and an optional
decimal exponent. Lua also accepts integer hexadecimal constants, by
prefixing them with 0x")

On Thu, Jan 22, 2009 at 4:28 PM, Linker <linker.m.lin@gmail.com> wrote:
> Sorry for my mistake.
> But I found that I cannot assign 1.#INF to a variable.
> eg.
>
>> i=1/0
>> =i
> 1.#INF
>> j=1.#INF
> stdin:1: unexpected symbol near '#'
>>
>
> On Thu, Jan 22, 2009 at 22:09, Andy Armstrong <andy@hexten.net> wrote:
>>
>> On 22 Jan 2009, at 14:07, David Kastrup wrote:
>>>>
>>>> (0 divided by anything /is/ 0)
>>>
>>> Uh no.  0 divided by any non-zero definite number is 0.
>>
>>
>> I figured I was being precise enough for the context :)
>>
>> --
>> Andy Armstrong, Hexten
>>
>>
>>
>
>
>
> --
> Regards,
> Linker Lin
> linker.m.lin@gmail.com
>