lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Apr 30, 2010 at 15:08, Benoit Germain <bgermain@ubisoft.fr> wrote:
> Hello,
>
> When parsing a negative number, unary minus is valid before the digits.
> However, when parsing a positive number, ‘unary plus’ yields a syntax error:
>
> Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
>> = -1
> -1
>> = +1
> stdin:1: unexpected symbol near '+'
>
> Is this a bug or a feature?

I guess neither, since Lua doesn't have a unary plus operator :)
See http://www.lua.org/manual/5.1/manual.html#8


-- 
Dirk