gives the current serial number to be used for local variables that are created.


  • $ModuleNumber is incremented every time Module or Unique is called.
  • Every Wolfram System session starts with $ModuleNumber set to 1.
  • You can reset $ModuleNumber to a positive machine integer, but if you do so, naming conflicts may lead to inefficiencies.
Introduced in 1991