Unique
✖
Unique
Details

- Unique[x] numbers the symbols it creates using $ModuleNumber, and increments $ModuleNumber every time it is called.
- Unique["xxx"] numbers the symbols it creates sequentially, starting at 1 for each string xxx.
- Unique[name,{attr1,attr2,…}] generates a symbol that has the attributes attri.
Examples
open allclose allBasic Examples (1)Summary of the most common use cases
In[1]:=1

✖
https://wolfram.com/xid/0y8s8a-vi3wr
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0y8s8a-hlfb0m
Out[2]=2

Scope (3)Survey of the scope of standard use cases
Create a unique symbol with no particular name:
In[1]:=1

✖
https://wolfram.com/xid/0y8s8a-bigfgt
Out[1]=1

Create a unique symbol whose name begins with x:
In[1]:=1

✖
https://wolfram.com/xid/0y8s8a-h1y9c
Out[1]=1

Create a unique symbol in the way Module does:
In[1]:=1

✖
https://wolfram.com/xid/0y8s8a-hjvrbv
Out[1]=1

Properties & Relations (3)Properties of the function, and connections to other functions
Each use of Unique[symbol] increments $ModuleNumber:
In[1]:=1

✖
https://wolfram.com/xid/0y8s8a-jjks0b
Out[1]=1

Unique[symbol] creates symbols in the same way Module does:
In[1]:=1

✖
https://wolfram.com/xid/0y8s8a-0ibhh
Out[1]=1

Unique["x"] uses the first unused symbol of the form xnnn:
In[1]:=1

✖
https://wolfram.com/xid/0y8s8a-hdmzeg
Out[1]=1

Wolfram Research (1988), Unique, Wolfram Language function, https://reference.wolfram.com/language/ref/Unique.html.
✖
Wolfram Research (1988), Unique, Wolfram Language function, https://reference.wolfram.com/language/ref/Unique.html.
Text
Wolfram Research (1988), Unique, Wolfram Language function, https://reference.wolfram.com/language/ref/Unique.html.
✖
Wolfram Research (1988), Unique, Wolfram Language function, https://reference.wolfram.com/language/ref/Unique.html.
CMS
Wolfram Language. 1988. "Unique." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Unique.html.
✖
Wolfram Language. 1988. "Unique." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Unique.html.
APA
Wolfram Language. (1988). Unique. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Unique.html
✖
Wolfram Language. (1988). Unique. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Unique.html
BibTeX
✖
@misc{reference.wolfram_2025_unique, author="Wolfram Research", title="{Unique}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Unique.html}", note=[Accessed: 25-March-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_unique, organization={Wolfram Research}, title={Unique}, year={1988}, url={https://reference.wolfram.com/language/ref/Unique.html}, note=[Accessed: 25-March-2025
]}