lua-users home
lua-l archive

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

Sam Roberts wrote:
It does have the "=" shortcut:

	> = 1 + 4
	> = (function() return"hello world" end)()
	hello world

= is just replaced with "return "

I didn't know that one, cool!

Also, a trick I learned from somewhere in the source and use in my
interactive consoles - I prepend "return " to any code before loading
it. If it fails to compile because of a syntax error, I try again
without the return.

I finally came around to try this one out today and it worked like a charm. It's a neat hack, thanks!