lua-users home
lua-l archive

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


It was thus said that the Great Sean Conner once stated:
> 
> 	for v1,... in <iterator()> do <block> end
> 
> 	do
> 	  local f,s,var = <iterator()>
> 	  ::L1::
> 	  local v1,... = f(s,var)
> 	  if not v1 == nil then goto L2 end
> 	  <block>
> 	  goto L1
> 	end
> 	::L2::

  Sorry, a mistake.  This sould read:

	do
	  local f,s,var = <iterator()>
	  ::L1::
	  local v1,... = f(s,var)
	  if not v1 ~= nil then goto L2 end
	  <block>
	  goto L1
	end
	::L2::

  -spc (There's a reason why I used 'if not' instead of just 'if' ... )