lua-users home
lua-l archive

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


> > > Actually, this is more serious than I thought.  In Lua 5.0,
> > this works:
> > > 
> > > mytable = { 1, 2, 3, 4 }
> > > for c in mytable do
> > >     print(c)
> > > end
> > > 
> > > In Lua 5.1 work 6, it hangs indefinitely...
> > 
> > Not in my copy. It just gives
> > 	attempt to call a table value
> > which is due to the removal of the "for k in table" syntax.
> > Try "for c in next,mytable do"
> > 
> > And I could not reproduce your other examples. Are you 
> running a clean 
> > copy of 5.1w6?
> 
> Yes.  Visual C++ 7.1.  I just created a console project, 
> added all the files, compiled, and ran a Debug build.
> 
> for c in next,mytable do print(c) end
> 
> Prints:
> 
> 1
> 
> and then hangs.

As a follow-up, mytable doesn't actually need to exist for it to hang.  I'll
debug as soon as I can get a chance...

Josh