lua-users home
lua-l archive

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


I have tried 32 bit  int and double. No bugs found (yet).

On Sat, Jul 6, 2013 at 11:10 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> Does the integer representation require something special to use, or is
>> used automatically for any number that happens to be an integer?
>
> The lexer decides which type of number a numeric value is.
> So 123 is an integer and 123.0 is a real.
>
> All operations on values of the same type give values of that type,
> except that division always gives a real. There is a new integer
> division operation, denoted by //.
>
> So 13/4 gives 3.25 and 13//4 gives 3. Also, 12/4 gives 3.0 and 12//4 gives 3.
>
>> Also, does the integer support need any special build-time flag/option
>> to enable?
>
> No. And it cannot be disabled either.
>



-- 
David Burgess