lua-users home
lua-l archive

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


On 18/12/2014 13.40, Roberto Ierusalimschy wrote:
Anyone else want to try an answer?

Wild, wild guesses:

  string.rep("a", 2.7)
  -->  "aa"

  string.format("%d", 2.7)
  --> the IEEE format for 2.7 interpreted as (int)

  string.rep("a", 2.3)
  -->  "aa"

  string.format("%d", 2.3)
  --> the IEEE format for 2.3 interpreted as (int)

Let's see if I managed to get all 4 wrong :-)

--
  Enrico