[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Syntax error: 1+2 without assignment
- From: Pavel <temp213@...>
- Date: Tue, 29 Oct 2019 05:07:23 -0700 (MST)
Fernando Jefferson-2 wrote
> In Lua 5.3 interpreter the expression "1 + 1
> <enter>
> " works perfectly.
my question is not about REPL, where each line has a 'return' prepended if
interpretation is failed.
Actually i just realized that allowing such a C-like behavior would break
the present Lua interactive interpreter as it works exactly because of `1+2`
statement causes syntax error.
nobody wrote
> And then what's the meaning of
> foo = a
> "b" .. c
> ?
>
> Is it still `foo = a( "b" ) .. c`? Is it `foo = a ; "b" .. c`?
> Something else?
exactly the same with a parentheses:
a = b+c
(foo())
a=b+c(foo())
--
Sent from: http://lua.2524044.n2.nabble.com/Lua-l-f2524044.html