This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Unique

Unique
generates a new symbol, whose name is of the form .
Unique[x]
generates a new symbol, with a name of the form .
Unique
generates a list of new symbols.
Unique
generates a new symbol, with a name of the form xxxnnn.
  • Unique numbers the symbols it creates sequentially, starting at 1 for each string xxx.
  • Unique generates a symbol that has the attributes .
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Create a unique symbol with no particular name:
Create a unique symbol whose name begins with x:
Create a unique symbol in the way Module does:
Each use of Unique[symbol] increments $ModuleNumber:
Unique[symbol] creates symbols in the same way Module does:
Unique uses the first unused symbol of the form xnnn:
New in 1