Skip to main content
5 events
when toggle format what by license comment
Jul 3, 2016 at 15:14 comment added Kuba Ah, right, my mistake, sorry.
Jul 3, 2016 at 15:07 history edited masterxilo CC BY-SA 3.0
added 116 characters in body
Jul 3, 2016 at 15:06 comment added masterxilo You have to ClearAll[Global`x] before running it in the Module. I am arguing for what you suggested, f[ x$123_ ]= x$123 in the OP. But f@x_ = x$123 would also make sense, because at the moment, ClearAll[Globalx, Globalf]; x = 1; f@x_ = x; f@0 gives 1, but ClearAll[Globalx, Globalf]; Module[{x}, x = 1; f@x_ = x;]; f@0 gives 0, just like with the Rule example I posted here.
Jul 3, 2016 at 8:15 comment added Kuba I get 1 in Module and in Global` context. What version are you using? Moreover, I think that would be really unexpected: f@x_ = x$123 but why not f[ x$123_ ]= x$123? What do you think?
Jul 2, 2016 at 17:39 history answered masterxilo CC BY-SA 3.0