Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1992
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

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

Search the Archive

Set inside Module

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Set inside Module
  • From: Sabine.Trott at bibliothek.tu-ilmenau.de
  • Date: Mon, 19 Oct 1992 19:43:31 +0000

 MathGroup,

 when I type the following:

 y=1;g[y_]=y;{g[y],g[b]}

 the result is - as expected {1,1}.

 Inside Module:

 Module[{x=1},f[x_]=x;{f[x],f[a]}] 
 
 the result is {1,a} - I think because of renaming.
 
 How can I force Set to use the current value of x (better x$1) inside Module?
 
 
 
 
 Any suggestions?
 
 Michael Trott
 
 trott at physik.tu-ilmenau.de
 
 {x=y},





  • Prev by Date: InterpolatingFunction
  • Next by Date: sound with Soundblaster Card
  • Previous by thread: InterpolatingFunction
  • Next by thread: Set inside Module