lua-users home
lua-l archive

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

I do not understand the code in PIL 3rd in Listing 15.2 (page 158) "Module with export list".
It starts:

local function new (r,i) return {r=r, i=i} end
-- defines constant 'i'
local i =,1)

As I understand this, the intention is to have this in a module complex.lua.
But in the last statement above the "complex" comes out of blue air, it seems.

Is this a typo? Otherwise I do not understand the statement.

There might be already a list with errata --and this one might be in it-- , but I am missing the link to it. 

Hans van der Meer