With::dups Module::dups
Details
-
- This message is generated when a name that is chosen for a local variable in With or Module may conflict with a name that is introduced as part of the process of variable localization.
- This message can occur if the names of local variables end in the $ character. It is recommended that names of this form be avoided.
- Off[message] switches off the message; On[message] switches it on. For example: Off[With::dups].
Examples
Basic Examples (1)
Since variable localization may involve generating new symbols by appending a $ character to the names of existing symbols, the names in this input may lead to conflicts:
With[{x = 2, x$ = 1}, x$ + x]This input shows valid choices for the names of local variables in With:
With[{x = 2, y = 1}, x + y]