MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Function definition within a module (about variable renaming)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79608] Function definition within a module (about variable renaming)
  • From: "Zeng.Shixin at gmail.com" <Zeng.Shixin at gmail.com>
  • Date: Tue, 31 Jul 2007 06:06:29 -0400 (EDT)

I have following code:

fun[] := Module[{a},
      a = {3x};
      f1[x_] = a[[1]]; (*change this line to f1[x_] = 3x, it works
fine (no variable renaming) *)
      ];

Then I try to find out the definition about f1, I got:

?f1
Global`f1
f1[x$_] = 3 x

I think It should be "f1[x_] = 3 x" instead. I just can't understand
why the variable x in f1 was renamed to x$. I went to the help system,
but I didn't find any useful information.

Thanks in advance.



  • Prev by Date: Is Save As->HTML broken in 6.0?
  • Next by Date: Coefficient...
  • Previous by thread: Is Save As->HTML broken in 6.0?
  • Next by thread: Coefficient...