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

setq

setq( 
s_variableName 
g_newValueExp 
) 
=> g_result
setq( 
s_variableName = g_newValue 
) 
=> g_result

Description

Sets a variable to a new value. setq is the same as the assignment (=) operator. This is a syntax form.

The symbol s_variableName is bound to the value of g_newValueExp. The first argument to setq is not evaluated but the second one is.

Arguments

s_variableName

Variable to be bound.

g_newValueExp

Expression to be evaluated and bound to s_variableName.

Value Returned

g_result

Evaluated result of g_newValueExp is returned.

Examples

Assigns the value 5 to the variable x.

x = 5         
=> 5

Assigns the value 5 to the variable x.

setq( x 5 )   
=> 5

Assigns the symbol a to the variable y.

y = 'a        
=> a

Related Topics

set


Return to top
 ⠀
X