lua-users home
lua-l archive

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


Irayo wrote:
[...]

Also, as a side note, negatives have the same result:

> print(string.rep("1+", -10).."+1");
+1

Again, the coder made a mistake somewhere, or doesn't know what he's doing, so it's worth considering throwing an error.

Another side note, (2^31)+1 has the same result going through string.rep as 2^32 does.

--
Irayo