[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: is there an "improved interactive mode"?
- From: Asko Kauppi <askok@...>
- Date: Fri, 24 Feb 2006 19:09:36 +0200
Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
> a=2+3; =a
stdin:1: unexpected symbol near `='
> = (function() a=2+3 end)(), a
Goran Zoricic kirjoitti 24.2.2006 kello 17.37:
Goran Zoricic wrote:
Alex Queiroz wrote:
On 2/24/06, Pavol Severa <email@example.com> wrote:
I imagine there are some formal problems:
1. a function call is a valid statement - still it would be nice if
its results were printed (except when it's nil)
Try putting a '=' before the expression or function call.
A followup question: if i write '= 2+3', the lua console prints '6',
as it should. However, lua doesn't support expression cascading
('a=b=c;' is not valid), so if i write something like '=a=2+3;', i
get an error. Is there a way to make it print '6' even in this case?
'= 2+3' actually prints '5', most of the time. :))
The absolute law of the universe: everything depends