lua-users home
lua-l archive

Re: Does PIL (3rd edition) repeatedly misuse the length operator on tables and invoke undefined behavior?

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


On 2014年09月18日 02:00, Daurnimator wrote:
On 17 September 2014 11:47, <polyglot@openmailbox.org> wrote:
The main problem, however, is that any integer less than 1 produces
the
empty set. Try n = -42 with your for loop.
Is that a problem?
Depends.
a = {}
a[#a + 1] = 'foo'
Would you be happy with #a = -42? What about #a = (some random integer <= 0)?

AltStyle によって変換されたページ (->オリジナル) /