lua-users home
lua-l archive

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



Notions on 5.1 work1 (compared to work0):

- no USE_POPEN, io.popen() any more
- no LUA_OPNAMES any more

And this is interesting:

	Lua 5.1 (work)  Copyright (C) 1994-2004 Tecgraf, PUC-Rio
	> print( table.getn( { 'a','b',[4]='c' } ))
	2

	Lua 5.1 (work1)  Copyright (C) 1994-2004 Tecgraf, PUC-Rio
	> print( table.getn( { 'a','b',[4]='c' } ))
	4

That is, 'table.getn' returns the _last_ integer index, and not the last before 'nil'.

Is this intentional, and can it be relied upon? For me, I welcome this with open arms; in fact, I had code to circumvent the problem before. Now, I only need to disable that code.. :)

-ak