Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Problems with With/Block/Module functions

  • To: mathgroup at
  • Subject: [mg64269] Re: Problems with With/Block/Module functions
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Wed, 8 Feb 2006 06:29:53 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <dsccna$pae$>
  • Sender: owner-wri-mathgroup at

Mukhtar Bekkali wrote:
> Hi:
> I want to use local assignment done for a subscripted variable, where
> x1 is ought to be read as x subscript 1, and evaluate at local values
> function g[x1] and use the result later on. My code (not actual, just
> an example) is as follows:
> x1=0;
> With[{x1=1},y=g[x1]] (* is some specific arbitrary function, say x1^2
> *)
> y
> My error message is "Local variable specification {x1=0} contains x1=0
> which is an assignment to x1; only assignments to symbols are allowed"
> Where on earth does Mathematica see a function in x1. To me this is
> just a symbol. Please advise on a workaround. Thanks.
Hi Mukhtar,

You must use the command Symbolize (from the palette) from the package 
Notation to transform x_1 in a symbol. See



x\[UnderBracket]Subscript\[UnderBracket]1 = 0;
With[{x\[UnderBracket]Subscript\[UnderBracket]1 = 1}, y = 


Best regards,

  • Prev by Date: Re: DSolve:: Bessel's differential equation
  • Next by Date: Using sockets for "downloader" application in Mathematica
  • Previous by thread: Re: Problems with With/Block/Module functions
  • Next by thread: Re: Problems with With/Block/Module functions