A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw70/CLHS/Body/m_incf_.htm below:

CLHS: Macro INCF, DECF

Macro INCF, DECF

Syntax:

incf place [delta-form] => new-value

decf place [delta-form] => new-value

Arguments and Values:

place---a place.

delta-form---a form; evaluated to produce a delta. The default is 1.

delta---a number.

new-value---a number.

Description:

incf and decf are used for incrementing and decrementing the value of place, respectively.

The delta is added to (in the case of incf) or subtracted from (in the case of decf) the number in place and the result is stored in place.

Any necessary type conversions are performed automatically.

For information about the evaluation of subforms of places, see Section 5.1.1.1 (Evaluation of Subforms to Places).

Examples:

 (setq n 0)
 (incf n) =>  1      
 n =>  1
 (decf n 3) =>  -2   
 n =>  -2
 (decf n -5) =>  3      
 (decf n) =>  2      
 (incf n 0.5) =>  2.5
 (decf n) =>  1.5
 n =>  1.5

Side Effects:

Place is modified.

Affected By: None.

Exceptional Situations: None.

See Also:

+, -, 1+, 1-, setf

Notes: None.

The following X3J13 cleanup issue, not part of the specification, applies to this section:
Copyright 1996-2005, LispWorks Ltd. All rights reserved.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4