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

importSkillVar

importSkillVar( 
s_variable ... 
) 
=> t / nil

Description

(SKILL++ mode) Tells the compiler that the given variable names should be treated as SKILL global variables in SKILL++ code.

All global SKILL functions are automatically accessible from SKILL++ code, but not the SKILL variables. This form tells the compiler that the given variable names should be treated as SKILL global variables in SKILL++ code.

This function returns nil if there is already a SKILL++ global variable of the same name defined. Also remember that local variables can use the same name and always take precedence.

This only means that the variables will be accessed as SKILL globals, NOT that they will follow SKILL’s dynamic scope rule in SKILL++ code.

Arguments

s_variable

Variable to be treated as SKILL global variables in SKILL++ code.

Value Returned

t

All variables were imported successfully.

nil

One or more variables failed to import.

If the variables are not imported, a warning message displays.

Examples

The following example shows assigning a value to the global variable q in SKILL mode and then importing the variable into SKILL++.

> q = 1
=> 1
> toplevel 'ils
ILS-<2> q
*Error* eval: unbound variable - q
ILS-<2> importSkillVar( q )
=> 1
ILS-<2> q
=> 1

Related Topics

get


Return to top
 ⠀
X