Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

setf

setf( 
g_place 
g_value 
) 
=> g_result

setf( 
g_place := g_value
=> g_result

Description

Assigns a new value to an existing storage location, destroying the value that was previously in that location. setf is the same as the assignment (:=) operator. This is a syntax form.

The setf function uses special expander functions, defined as setf_<helper>.

Arguments

g_place

Specifies the storage location

g_value

Specifies the new value

Value Returned

g_result

Returns the updated result

Examples

x = '(a b c d e)
setf( (car x) 42);; here x changes to (42 b c d e)
=> (42 b c d e)
x = '(a b c d e)
(car x) := 42
x
=> (42 b c d e)

Related Topics

pushf

popf

setf Helper Functions


Return to top
 ⠀
X