lua-users home
lua-l archive

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

I prefer the version 5.3. The code is much cleaner with this distinction
between integers and real numbers.

About the quiz, in version 5.2, I believe that all values are considered
equal to 2.

Porting to version 5.3 is now complete for me. That works very well :)

Thanks !

-----Message d'origine-----
De : [] De la
part de Roberto Ierusalimschy
Envoyé : mercredi 17 décembre 2014 18:34
À : Lua mailing list
Objet : Re: [ANN] Lua 5.3.0 (rc1) now available

> I have checked 100k Lua source and see a few errors (sometimes crash).
> [...]
> I don't know what is the best solution.
> Actually I try to replace all '/' with '//' where I want integer division.

That certainly would help, but an essential point is to understand how
you *want* to round these values.

As this point has come up several times, I have a quick quiz for this
list. Without running the code, what are the results of the following
expressions in Lua 5.2?

  string.rep("a", 2.7)
  string.format("%d", 2.7)
  string.rep("a", 2.3)
  string.format("%d", 2.3)

-- Roberto