lua-users home
lua-l archive

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


> However, the Lua parser takes the preceding "-" and does not
> pass it to the numeric conversion routine.
> 
> Instead, it passes everything AFTER the "-" and then does the
> unary minus as defined for the default arithmetic type.

Most languages do this. If you include the "-" as part of the number
you will need some trick to parse "x-1", as it would read as a variable
("x") followed by a constant ("-1"), with no operation.

-- Roberto