Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

While Set isn't a scoping construct (SC), it is considered one by other SCs outer to it. ref / Set / Details[[-3]] (thanks to Alexey PopkovAlexey Popkov for correcting me).

Here it is inner to the Module and Module decides not to interfere in this case (don't know why), but you can trick it:

Module[{x},
  Set @@ {f[x_], Integrate[y^2, {y, 0, x}]};
]

?f
f[x$301_]=x$301^3/3

Further reading: Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructsEnforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs

While Set isn't a scoping construct (SC), it is considered one by other SCs outer to it. ref / Set / Details[[-3]] (thanks to Alexey Popkov for correcting me).

Here it is inner to the Module and Module decides not to interfere in this case (don't know why), but you can trick it:

Module[{x},
  Set @@ {f[x_], Integrate[y^2, {y, 0, x}]};
]

?f
f[x$301_]=x$301^3/3

Further reading: Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs

While Set isn't a scoping construct (SC), it is considered one by other SCs outer to it. ref / Set / Details[[-3]] (thanks to Alexey Popkov for correcting me).

Here it is inner to the Module and Module decides not to interfere in this case (don't know why), but you can trick it:

Module[{x},
  Set @@ {f[x_], Integrate[y^2, {y, 0, x}]};
]

?f
f[x$301_]=x$301^3/3

Further reading: Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs

added 271 characters in body
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751

While Set itisn't a scoping construct (SC), hereit is considered one by other SCs outer to it. ref / Set / Details[[-3]] (thanks to Alexey Popkov for correcting me).

Here it is inner to the Module and Module decides not to interfere in this case (don't know why), but you can trick it:

Module[{x},
  Set @@ {f[x_], Integrate[y^2, {y, 0, x}]};
]

?f
f[x$301_]=x$301^3/3

Further reading: Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs

Set it a scoping construct, here inner to the Module and Module decides not to interfere in this case (don't know why), but you can trick it:

Module[{x},
  Set @@ {f[x_], Integrate[y^2, {y, 0, x}]};
]

?f
f[x$301_]=x$301^3/3

Further reading: Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs

While Set isn't a scoping construct (SC), it is considered one by other SCs outer to it. ref / Set / Details[[-3]] (thanks to Alexey Popkov for correcting me).

Here it is inner to the Module and Module decides not to interfere in this case (don't know why), but you can trick it:

Module[{x},
  Set @@ {f[x_], Integrate[y^2, {y, 0, x}]};
]

?f
f[x$301_]=x$301^3/3

Further reading: Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs

added 187 characters in body
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751

Set it a scoping construct, here inner to the Module and Module decides not to interfere in this case (don't know why), but you can trick it:

Module[{x},
  Set @@ {f[x_], Integrate[y^2, {y, 0, x}]};
]

?f
f[x$301_]=x$301^3/3

Further reading: Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs

Set it a scoping construct, here inner to the Module and Module decides not to interfere in this case (don't know why), but you can trick it:

Module[{x},
  Set @@ {f[x_], Integrate[y^2, {y, 0, x}]};
]

?f
f[x$301_]=x$301^3/3

Set it a scoping construct, here inner to the Module and Module decides not to interfere in this case (don't know why), but you can trick it:

Module[{x},
  Set @@ {f[x_], Integrate[y^2, {y, 0, x}]};
]

?f
f[x$301_]=x$301^3/3

Further reading: Enforcing correct variable bindings and avoiding renamings for conflicting variables in nested scoping constructs

Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751
Loading