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

remove

remove( 
g_x 
l_arg 
) 
=> l_result

remove( 
g_key 
o_table 
) 
=> g_value

Description

Returns a copy of a list with all top-level elements equal to a SKILL object removed. Can also be used to remove an entry from an association table, in which case the removal is destructive, that is, any other reference to the table will also see the changes. remove uses equal for comparison. remove can also be used with an association table to identify and remove an entry corresponding to the key specified in the function.

Arguments

g_x

Any SKILL object to be removed from the list.

l_arg

List from which to remove g_x.

g_key

Key or first element of the key/value pair.

o_table

Association table containing the key/value pairs to be processed.

Value Returned

l_result

Copy of l_arg with all top-level elements equal to g_x removed.

g_value

Value associated with the key that is removed.

Examples

remove( "x" '("a" "b" "x" "d" "f")) 
=> ("a" "b" "d" "f")
myTable = makeTable("myTable" -1) 
=> table:myTable   ;default is -1
myTable["two"]=2
=> 2
remove("two" myTable)
=> 2   ; permanently removed from table
myTable["two"]
=> -1   ; the default value

Related Topics

remd

remove

remq


Return to top
 ⠀
X