lua-users home
lua-l archive

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


> for c in next,mytable do print(c) end
> 
> Prints:
> 
> 1
> 
> and then hangs.

When I force the db_errorfb level to a real value, I get:

Lua 5.1 (work6)  Copyright (C) 1994-2005 Tecgraf, PUC-Rio
> mytable = { 1, 2, 3, 4 }
> for c in next,mytable do print(c) end
1
invalid key to 'next'
stack traceback:
        [C]: in function '(for generator)'
        stdin:1: in main chunk
        [C]: ?
>

Josh