[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.1 (final) now available
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 18 Jun 2015 23:08:39 +0200
2015-06-18 20:43 GMT+02:00 Tom N Harris <whoopdedo@whoopdedo.org>:
> On Thursday, June 18, 2015 01:12:27 PM Dirk Laurie wrote:
> If the interpreter is going to accept expressions then it should do so without
> quirky corner-cases.
None of these is quirky or a corner case. All behave exactly as documented.
>> 1 + math.random()
> 1.8401877167635
Complete expression on one line --> evaluated and printed.
>> 1 + math.random(
> stdin:1: unexpected symbol near '1'
Code that cannot possibly be a prefix to a valid function body --> error
>> math.random()
> 0.39438292663544
Complete expression on one line --> evaluated and printed.
>> math.random(
>>> )
>>
First line is not an expression but could be a prefix to a valid function
body --> another line is added.
Second line completes it. It is a function call --> performed but
return values are discarded.