Previous: Kinds of Places, Up: Generalized Reference
For each of the “read-modify-write” operators in Figure 5–9, and for any additional macros defined by the programmer using define-modify-macro, an exception is made to the normal rule of left-to-right evaluation of arguments. Evaluation of argument forms occurs in left-to-right order, with the exception that for the place argument, the actual read of the “old value” from that place happens after all of the argument form evaluations, and just before a “new value” is computed and written back into the place.
Specifically, each of these operators can be viewed as involving a form with the following general syntax:
(operator {preceding-form}* place {following-form}*)
The evaluation of each such form proceeds like this:
Evaluate each of the preceding-forms, in left-to-right order.
Evaluate the subforms of the place, in the order specified by the second value of the setf expansion for that place.
Evaluate each of the following-forms, in left-to-right order.
Read the old value from place.
Compute the new value.
Store the new value into place.
decf pop pushnew incf push remf Figure 5–9: Read-Modify-Write Macros