lua-users home
lua-l archive

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


Hi All,

This code for "cgi.lua" gives me the error: unexpected symbol near '%'
-----------------
local I = {}
function I.from_hex(str)
	local result = 0
	while(str ~= "") do
		local digit = %I.to_d(strsub(str,1,1))
		result = result * 16 + digit
		str = strsub(str,2)
	end
	return result
end
--------------
Lua 5.0 on Linux Slackware 9.0

Any idea?
Thanks!

jilani

ps.
is there any other open library to use CGI with Lua?