ToC DocOverview CGDoc RelNotes Index PermutedIndex
Allegro CL
Home Previous Up Next Table of Contents Index
  ANSI Common Lisp   5 Data and Control Flow   5.1 Generalized Reference   5.1.2 Kinds of Places

5.1.2.3 VALUES Forms as Places

A values form can be used as a place, provided that each of its subforms is also a place form.

A form such as

(setf (values place-1 ... place-n) values-form)

does the following:

  • 1. The subforms of each nested place are evaluated in left-to-right order.
  • 2. The values-form is evaluated, and the first store variable from each place is bound to its return values as if by multiple-value-bind.
  • 3. If the setf expansion for any place involves more than one store variable, then the additional store variables are bound to nil.
  • 4. The storing forms for each place are evaluated in left-to-right order.

The storing form in the setf expansion of values returns as multiple values2 the values of the store variables in step 2. That is, the number of values returned is the same as the number of place forms. This may be more or fewer values than are produced by the values-form.


Home Previous Up Next Table of Contents Index
© Franz Inc. All Rights Reserved - File last updated 2022-07-25