MathGroup Archive 2010

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

Search the Archive

Re: Variables in Iterator limits?

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=.

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

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?