The parser does accepts a "-" before literal numbers but it's not possible for arbitrary expressions.
However you have the message #negated .
negatedWidth
^ self width negated
Cheers,
Camille
Hi,
I am using latest Pharo 3.0 + vm.
I have a method width with
width
^ 115 * self ratio.
in my understanding it returns a Number.
When I try to create a method
negatedWidth
^ - (self width).
the UI tells me that only Numbers may be negated. I am not able to save the method. Am I on a wrong path or should that work and if how can I avoid the UI error message?
Regards
Max