Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Variables in Iterator limits?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109632] Re: Variables in Iterator limits?
  • From: Simon <simonjtyler at gmail.com>
  • Date: Sun, 9 May 2010 07:49:35 -0400 (EDT)
  • References: <hs3gic$rt2$1@smc.vnet.net>

It's an order of evaluation thing (and a little bit of a gotcha).
Here's a simpler example:

In[1]:= px:=Print[x]

In[2]:= x=5; px; x=.
5

In[3]:= px/.x->5
x

The reason your images still displays is because after the error is
outputted, the replacement rule fires: eg

Graphics[Line[{{0, 0}, {0, x}}]]
% /. x -> 1


  • Prev by Date: Mathematica in Education and Research?
  • Next by Date: help with DictionaryLookup[] and a type of regular expression
  • Previous by thread: Variables in Iterator limits?
  • Next by thread: Re: Variables in Iterator limits?