On 07 Sep 2016, at 13:37, Nicolai Hess <nicolaihess@gmail.com> wrote:
Fraction>>round: numberOfWishedDecimal "Round the decimal part of the receiver to be limited to the number of wished decimal. Only leave a fixed amount of decimal" < expr: (1/3 round: 2) result: 0.33 > < expr: (111/100 round: 2) result: 1.11 >
^self asFloat round: numberOfWishedDecimal
this method was changed for case 19034 <https://pharo.fogbugz.com/f/cases/19034/Improve-comment-of-round> Improve comment of round:
ups⦠I did not review correctly. I thought that only the comment changed. Pragmas are not comments...
But I think < expr: (111/100 round: 2) result: 1.11 > is actually not a valid pragma expression. (Squeak compiler does not allow this).
1. Do we want to allow this syntax ( I don't want)
No! This would make the system quite unreadable if you add lots of those everywhere. Marcus