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

setcar

setcar( 
l_arg1 
g_arg2 
) 
=> l_result

Description

Replaces the first element of a list with an object in the same way as rplaca. This is a destructive operation, meaning that any other reference to the list will also see the change.

Arguments

l_arg1

This is a list.

g_arg2

This is a SKILL object.

Value Returned

l_result

Modified l_arg1 with the car of l_arg1 replaced by g_arg2.

Examples

x = '(a b c)        
=> (a b c)
setcar( x 'd )      
=> (d b c)
x                   
=> (d b c)

The car of x is replaced by the second argument.

Related Topics

rplacd

rplaca

setcdr


Return to top
 ⠀
X