home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / sci / math / 9582 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  829 b 

  1. From: jpat@hpsad.sad.hp.com (Jeff Patterson)
  2. Date: Mon, 27 Jul 1992 17:27:48 GMT
  3. Subject: Re: Mathematica Help
  4. Message-ID: <1900007@hpsad.sad.hp.com>
  5. Organization: HP Signal Analysis Division - Rohnert Park, CA
  6. Path: sparky!uunet!darwin.sura.net!mips!sdd.hp.com!hplabs!hplextra!hpl-opus!hpnmdla!hpsad!jpat
  7. Newsgroups: sci.math
  8. References: <1992Jul21.222351.160911@cs.cmu.edu>
  9. Lines: 18
  10.  
  11. In a previous post I stated that MMa did not allow direct assignment to a list.
  12. This is wrong, assignment is allowed as long as the element for which the 
  13. assignment is being made exists and has an immediate value. I.e.
  14.  
  15. a[[2]] = 12 results in 
  16. Part::noval: Symbol a in part assignment does not have an immediate value.
  17.  
  18. while 
  19.   a={1,2,3}
  20.   a[[2]] = 12 
  21.  
  22. results in
  23.   a= {1,12,3}
  24.  
  25. Thanks to Michael Somos for pointing out my error.
  26. -Jeff
  27.  
  28.  
  29.