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

makeSymbol

makeSymbol( 
S_createSymbol 
[ t_namespaceArg ]
) 
=> s_result

Description

Creates a symbol corresponding to the specified symbol or character string. You can optionally specify the namespace name (t_namespace) in which you want to create the symbol.

The function gensym() also creates symbols. However, the symbol names are determined internally (and are therefore unique) whereas in the case of makeSymbol() the symbol name depends upon the string passed as a parameter to the function.

Arguments

S_createSymbol

Specifies the value for which a corresponding symbol needs to be created.

t_namespaceArg

Specifies the name of the namespace in which you want to create the symbol.

Value Returned

s_result

A symbol corresponding to the specified string value.

Examples

The following example creates a symbol corresponding to the specified string value, myString.

makeSymbol(“myString”)
=> myString

The following example usesd an increment counter (count) to create unique symbols (myString1, myString2, and so on)

count=0
makeSymbol(strcat("myString" sprintf(nil "%L" ++count)))

The following example creates a symbol, myString, in the namespace, newNamespace.

makeNamespace("newNamespace")
makeSymbol("myString" "newNamespace")
=> newNamespace:::myString

Related Topics

Core Functions


Return to top
 ⠀
X