[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: block return semantic
- From: David Jeske <jeske@...>
- Date: Tue, 26 Jun 2001 12:26:28 -0700
On Tue, Jun 26, 2001 at 03:02:25PM -0300, Luiz Henrique de Figueiredo wrote:
> > Seems like you could easily modify the stand-alone interpreter to do
> > this by checking the return value and printing it if it's non-nil. Lua
> > is the language, not the stand-alone interpreter.
> I agree. Perhaps we can add a new command line switch, say -I, that prefaces
> every line with a "return", except those beginning with a keyword.
To be clear, I don't want to use this in the lua command line
interpreter. I have my own interpreter in my game and I want to
support it in there. I just want "lua_dostring()" to return the value
of the last expression evaluated, whether or not it had a return
> Changing the syntax of Lua to allow this strange sounds to me, plus I doubt it
> will be easy to do; ambiguities are probable.
> >> mozart:~/Project/Lua/lua31/bin> lua
> >> Lua 3.1 (alpha) Copyright (C) 1994-1998 TeCGraf
> 3.1 alpha?!
It was the first interpreter I had handy.. I have 3.1, 4.0a, and 4.0
on this machine. :)
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + email@example.com