lua-users home
lua-l archive

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


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?

 

Thanks,

 

 

Benoit.