lua-users home
lua-l archive

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


In ltm.c :
  __idiv

--- Original Message ---

From: "Sean Conner" <sean@conman.org>
Sent: 7 July 2013 02:38
To: "Lua mailing list" <lua-l@lists.lua.org>
Subject: Re: [ANN] Lua 5.3.0 (work1) now available

It was thus said that the Great Luiz Henrique de Figueiredo once stated:
> > 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 //.

  Is there an equivalent metatable function?

  -spc