MathGroup Archive 2008

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

Search the Archive

Re: help with new symbols (or pointers)


Hi,

look what Unique[] can do for you with

vars = Table[Unique["x"], {50}];
SetAttributes[vars, Temporary]

No pointers, but you can pass the name of a variable
instead of its value.

Regards
   Jens

ag wrote:
> Hi,
> 
> I want to create new symbols inside a module & assign them values=85
> 
> e.g. something like: Symbol[=93x=94<>"num"] = 5
> It is not working=85
> 
> The problem is that I dont know how many symbols I would need (it
> could be 5, 50 or 5000)... So I cannot do something like:
> Symbol["x"<>"1"];
> x1=5;
> 
> Is there anything in Mathematica which is like pointers in C
> (something which would assign a value to a given location in memory)?
> 
> Any help would be appreciated!
> 
> Thanks,
> AG.
> 


  • Prev by Date: Re: Old version notebooks
  • Next by Date: Re: help with new symbols (or pointers)
  • Previous by thread: help with new symbols (or pointers)
  • Next by thread: Re: help with new symbols (or pointers)