lua-users home
lua-l archive

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


>   function foo()
>     local a
>     bar = function()
>       x = { a=1 }      --> error: cannot access outer var 'a'
>     end
>   end
	Funny!  The following code does work:

  function foo()
    local a
    bar = function()
      x = { b=2, a=1 }
    end
  end

	But changing the order ( { a=1, b=2 } ) it doesn't.

	Tomas