Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2054 > unrolled thread
| Started by | David Skulsky <edskulsky@gmail.com> |
|---|---|
| First post | 2011-05-03 09:46 +0000 |
| Last post | 2011-05-03 09:46 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: Please Help Eliminate My Ignorance David Skulsky <edskulsky@gmail.com> - 2011-05-03 09:46 +0000
| From | David Skulsky <edskulsky@gmail.com> |
|---|---|
| Date | 2011-05-03 09:46 +0000 |
| Subject | Re: 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
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web