78: Highlights
- Smalltalk offers negation, reciprocation, addition, subtraction,
multiplication, division, and many other arithmetic methods.
- Smalltalk does not follow the precedence conventions of
ordinary arithmetic; instead, Smalltalk handles arithmetic
messages as it handles messages in general.
- If you want to alter the way an arithmetic expression is computed,
or if you want to make your arithmetic expressions
clearer, then use parentheses to create subexpressions.
- If you want to convert a number belonging to one class into a number
belonging to another class, then use
asInteger
or asFloat
.