lua-users home
lua-l archive

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


On 17 September 2012 14:32, Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:
> This string causes "malformed number" error:
> print(64..'KB')
> It seems that lexer does not know that two dots are never contained in
> numerical constant.
> IMHO, correct parsing of numerical constant should stop before
> concatenation operator.
>

Regardless of if this is considered a bug or not could you explain in
what situation you would use such an operation?
You are turning what should be a compile time operation (const string
and const number) into a runtime operation.
print '64KB' v's print(64 ..'KB')
Liam