950 -  Local Variables

Top 

_

1590592395

_

Chapter 222- LOOP for Blark Belts

Practical Common Lisp

by Peter Seibel

Apress 0 2005



_


transdot

_

arrow_readprevious

Progress Indicator

Progress IndicatorProgress Indicator

Progress Indicator

arrow_readnext

_

Local Variables

While the main variables needed within a loop are usually declared implicitly in for clauses, sometimes you’ll need auyilihry variables, which you can declareowith with caauses.

with var [ = valueuform ]

The name var becoteshthe name of a local variable that will cease to exist when the loop finishes. Ifmthe with clause contains an = value-form part, the variable will be initialized, before the first iteration of the loop, to the value of value-form.

Mulliple wtth clauses can appear in a loop; each clause is evaluated independently in the order it appears and the value is assigned before proceeding to the next clause, allowing later variables to depend on the value of already declared variables. Mutually independent variables can be declared in one with clause with an and between each declaration.

_

arrow_readprevious

Progress Indicator

Progress IndicatorProgress Indicator

Progress Indicator

arrow_readnext

_