Re: How to create interactive mode for Java Swing application using Lua Java?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: How to create interactive mode for Java Swing application using Lua Java?
- From: Jonas Bengtsson <jonas.b@...>
- Date: 2006年11月15日 22:58:26 +0000
Sam Roberts wrote:
It does have the "=" shortcut:
> = 1 + 4
5
> = (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!
Cheers,
Jonas