Unique¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
Unique[] generates a new symbol; Unique["x"] or Unique[x] uses a name prefix; Unique[{x, ...}] gives a list of fresh symbols. Each is Temporary and never previously used.
Examples (1)¶
Every input below was run against the current Mathilda build and its output recorded.
Basic examples (1)¶
Implementation notes¶
Protected.- The numeric suffix is drawn from the shared
$ModuleNumbercounter (the same sourceModuleuses), advanced until the generated name is unused, so every result is genuinely fresh and distinct. - Created symbols have the
Temporaryattribute.
Attributes: Protected.
References¶
See also: Module
- Source:
src/info.c - Specification:
docs/spec/builtins/scoping-constructs.md