lua-users home
lua-l archive

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


Thanks very much Guys

This is working for me, I just might try to tweak it a bit so that it uses all return or print statements:
function one()
 print([[long long string]] .. (function() return "blah" end)() ..
[[more of the long string]])
end

I write terrible, verbose emails but just to explain the madness here. I am trying to convert XML documents, namely HTML and SVG from a series of nested tags to a series of nested functions. My hope is that I can use it for a templating "language". I could feed in a single table and then use lexical scoping within the nested functions to return a given value.

i.e quick garbage psuedo code

Function one return <head> get doctype from table or return doctype......<title> function two get title from table or .....</title> </head>

Thanks again for all your help, I will post back if anything I create looks even the slightest bit useful :-) Patrick