Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2028

Please Help Eliminate My Ignorance

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!newspump.sol.net!posts.news.twtelecom.net!nnrp2.twtelecom.net!not-for-mail
From Michael Mandelberg <mmandelberg@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Please Help Eliminate My Ignorance
Date Mon, 2 May 2011 10:52:05 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <ipm2cl$56f$1@smc.vnet.net> (permalink)
Lines 17
NNTP-Posting-Date 02 May 2011 09:52:52 GMT
NNTP-Posting-Host 356527e6.news.twtelecom.net
X-Trace DXC=K0P?I[5Z\S=6B[BDadA[j7C_A=>8kQj6=;[h;PUXBgb4O?h0ekRCH^:EFiONJ7[Go6C_NKGNfXJR:
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:2028

Show key headers only | View raw


Why does Mathematica like the first, but not the second?

1.
Clear[x, testp, p];
test[p_] :=  Append[p, p[[4]]];


2.
Clear[x, testp, p];
test[p_] := x = 1; Append[p, p[[4]]];

Part::partd: Part specification p[[4]] is longer than depth of object.
>>

Append::normal: Nonatomic expression expected at position 1 in
Append[p,p[[4]]]. >>

Back to comp.soft-sys.math.mathematica | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Please Help Eliminate My Ignorance Michael Mandelberg <mmandelberg@comcast.net> - 2011-05-02 10:52 +0000
  Re: Please Help Eliminate My Ignorance "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com> - 2011-05-03 09:46 +0000

csiph-web