MathGroup Archive 2007

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

Search the Archive

How to manipulate globals in a function?


I am trying to write code to manipulate a global array in a function.
How do something like this:

Moo [A_List, i_Integer] :=

      A[[i]] = 7;

Moo[A, 1]

This fails.  But, if I do this without a funciton it works.

i=1
A[[i]] = 7

JD



  • Prev by Date: Re: Custom sort a list of pairs
  • Next by Date: Re: Custom sort a list of pairs
  • Previous by thread: Re: FullSimplify question
  • Next by thread: Re: How to manipulate globals in a function?