MathGroup Archive 2007

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

Search the Archive

How to manipulate globals in a function?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73665] How to manipulate globals in a function?
  • From: davisjf at gmail.com
  • Date: Sat, 24 Feb 2007 02:15:00 -0500 (EST)

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?