neilsf / XC-BASIC

A compiling BASIC dialect for the Commodore-64
https://xc-basic.net/
MIT License
74 stars 15 forks source link

No 'unary -' (negate operator) #40

Closed Viza74 closed 3 years ago

Viza74 commented 5 years ago

No big deal, one can always use 0-variable instead, but thats not very elegant. :)

neilsf commented 5 years ago

The unary negation was working in a very early version but I decided to drop it and get back to it later. The problem was that the expression "-123" was misinterpreted by the parser as "123 * -1" and thus slowed down the code. I'll try to fix the parser and bring back this feature to v2.

neilsf commented 5 years ago

Postponed, sorry.

neilsf commented 3 years ago

Implemented in V3