MathGroup Archive 2005

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

Search the Archive

Re: What's the matter with this?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56125] Re: [mg56109] What's the matter with this?
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Sat, 16 Apr 2005 03:52:01 -0400 (EDT)
  • References: <200504150848.EAA11621@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 15 Apr 2005, at 17:48, Steve Gray wrote:

> *This message was transferred with a trial version of CommuniGate(tm) 
> Pro*
> I have a list
>
> intertemp[[1]] = {{14, 17, {0.7929, 0.4366}, {2.8146, 11.3986}}
>
> and a simple function
>
> modxx[axx_] := axx[[2]] = Mod[axx[[2]], 14, 1];
>
> When I do modxx[intertemp[[1]]] I get this:
>
> Set::setps: {14, 17, {0.792902, <<19>>}, {2.81469, 11.3986}}
> 	 in assignment of part is not a symbol.
>
> What does this mean and how can I do it correctly?
> I must be making a very simple error.
> I want the 17 to become 3 with no other changes.
>
> Thank you
>
> Steve Gray
>
>
You need to give your function moddxx the HoldFirst attribute with

SetAttributes[modxx, HoldFirst]

and everything should work fine.

Andrzej Kozlowski
Chiba, Japan
http://www.akikoz.net/andrzej/index.html
http://www.mimuw.edu.pl/~akoz/


  • Prev by Date: Re: Maping and Complex Addition
  • Next by Date: Re: What's the matter with this?
  • Previous by thread: What's the matter with this?
  • Next by thread: Re: What's the matter with this?