Add
The add operator (+) has subtle timing. If you really care about space or time, you can sometimes optimize it.
+ (and +*) must have had time for carry to propagate. This usually requires that a . instruction preceed it. But you don't need a . if + is
- the first instruction of a definition
- the first instruction returning from a definition
- following if -if next unext
- following a then that's preceeded by a ;
- in slot 3
- in slot 0, following a literal (@p !p) in slot 3
- following a dup (no ripple)
If you know carry won't ripple more than 9 places, you don't need a . But this is difficult to know, since it matters what number was in S before the latest push. (Carries were established which may have to be changed.)
Here's an example
The 2 fffs establish carries. Rippling for the 0 starts at the end of slot 0, but won't be finished by the end of slot 1. The result is 011ff instead of fff. Grossly incorrect.
If in doubt, use a .