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


Groups > comp.soft-sys.math.mathematica > #2054 > unrolled thread

Re: Please Help Eliminate My Ignorance

Started byDavid Skulsky <edskulsky@gmail.com>
First post2011-05-03 09:46 +0000
Last post2011-05-03 09:46 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Please Help Eliminate My Ignorance David Skulsky <edskulsky@gmail.com> - 2011-05-03 09:46 +0000

#2054 — Re: Please Help Eliminate My Ignorance

FromDavid Skulsky <edskulsky@gmail.com>
Date2011-05-03 09:46 +0000
SubjectRe: Please Help Eliminate My Ignorance
Message-ID<ipoiu8$g6m$1@smc.vnet.net>
I believe the problem with the second case is that the definition of test[] ends after the x=1; statement.  Mathematica subsequently processes Append[p,p[[4]]]; separately.  Since p hasn't been defined, it generates an error.  To fix the problem, use (for example) parenthesis:

test[p_]:=(x=1;Append[p,p[[4]]]);

David

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web