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

set

set( 
s_variableName 
g_newValue 
[ e_environment ]
) 
=> g_result

Description

Sets a variable to a new value. Similar to setq but the first argument for set is evaluated.

The set function is similar to the setq function, but unlike setq, the first argument for set is evaluated. This argument must evaluate to a symbol, whose value is then set to g_newValue.

Arguments

s_variableName

Symbol that is evaluated.

g_newValue

Value to set symbol to.

e_environment

If this argument is given, SKILL++ semantics is assumed. The forms entered will be evaluated within the given (lexical) environment.

Value Returned

g_result

Returns g_newValue.

Examples

y = 'a  
=> a   ; Sets y to the constant a.

set (y 5) 
=> 5    ; Sets the value of y to 5.
y       
=> a
a       
=> 5

Related Topics

setq


Return to top
 ⠀
X