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

setVarWriteProtect

setVarWriteProtect( 
s_name 
) 
=> t / nil

Description

(SKILL mode only) Sets the write-protection on a variable to prevent its value from being updated. Does not work in SKILL++ mode.

Use this function in SKILL mode only when the variable and its contents are to remain constant.

In SKILL++ mode, use setFnWriteProtect instead.

Arguments

s_name

Name of variable to be write-protected.

Value Returned

t

Variable is write protected.

nil

Variable was already write protected.

Examples

y = 5                                ; Initialize the variable y.
setVarWriteProtect( 'y )=> t ; Set y to be write protected.
setVarWriteProtect( 'y )=> nil   ; Already write protected.
y = 10                               ; y is write protected.
*Error* setq: Variable is protected and cannot be
assigned to - y

Related Topics

Function and Program Structure


Return to top
 ⠀
X