For the record, should we want to remove the option of having a (possible second) minus sign after the radix specification, the expression
self peekSignIsMinus ifTrue: [ neg := neg not ]. should be removed from NumberParser>>#nextNumber and #nextInteger But I haven't tested this. Some unit tests might fail since this 'feature' seems to be supported explicitly. > On 15 Jan 2020, at 17:38, ducasse <steph...@netcourrier.com> wrote: > > > >> On 15 Jan 2020, at 14:30, Sven Van Caekenberghe <s...@stfx.eu> wrote: >> >> Hi, >> >> I came across the following quirk that surprised me. >> >> Positive number in a arbitrary radix >> >> 16rA = 10 >> >> Same number but negative >> >> -16rA = -10 >> >> I guess, we all know that. >> >> However, the following is also possible >> >> 16r-A = -10 > > I would not support this one either >> >> I did not know that, but OK. >> >> But what about this one ? >> >> -16r-A = 10 >> >> I understand that the double negation is positive again, >> but do we really want to support such a syntax ? > > I would not > >> >> Sven