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 1998

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

Search the Archive

Re: Disappearing variables

  • To: mathgroup at
  • Subject: [mg13800] Re: [mg13759] Disappearing variables
  • From: "Jurgen Tischer" <jtischer at>
  • Date: Fri, 28 Aug 1998 04:18:23 -0400
  • Sender: owner-wri-mathgroup at

Hi Vilis,
I don't want to give the impression of the wise guy, I just fooled
around a bit. So:
1. Help on Remove says:
"If you have an expression that contains a symbol which you remove, the
removed symbol will be printed as Removed["name"], where its name is
given in a string. "
2. If you look at f after you removed x, it shows

In[1]:= ?f

f := Removed["x"] = 123

So that's it, the definition of f is an expression. If your question is
not purely academic, maybe you could use Clear instead of Remove?


-----Original Message-----
From: nobody at News.Dal.Ca <nobody at News.Dal.Ca> To: mathgroup at
Subject: [mg13800] [mg13759] Disappearing variables

>I want to to define a variable inside a function, as follows: f:=x=123;
>Whenever I run f, x should be given the value of 123, and if x doesn't
>exist, it should be created. However:
>In[1]:= f:=x=123;
>Out[3]:=123        ** x exists
>Out[5]:=123  ** f seems to work
>Out[6]:=x     ** x doesn't exist anymore, even though f worked
>It seems like x is created when I initially define f, whereas since f is
>SetDelayed,  x should be created when I run f.  Does anyone know why x
>is not created when I run f?
>Vilis Nams

  • Prev by Date: Re: A couple of curious outputs from Integrate[]
  • Next by Date: Re: Question for using complex variables
  • Previous by thread: Re: Disappearing variables
  • Next by thread: Re: Disappearing variables