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

defvar

defvar( 
s_varName 
[ g_value ] 
) 
=> g_value / nil

Description

Defines a variable and assign it a value.The variable defined follows the scoping rule.

Arguments

s_varName

Name of the variable to be defined.

g_value

Value to assign to the variable. If g_value is not given, nil is assigned to the variable.

Value Returned

g_value

The value of the defined variable.

nil

The variable is not defined.

Examples

The following example assigns x a value of 3.

defvar(x 3) 
=> 3

Related Topics

defprop

set

setq

Contrast Variable Scoping


Return to top
 ⠀
X