Problems with "Index out of range"?

I have recently updated to Igor 6.3.2 and I feel like something has changed with how often I end up with the "Index out of range" error. I feel like previously Igor would just do it's thing, even if I was trying to work with two different waves that are of different sizes and have not specified the indexing correctly. But now I get an error when I do such things. Take the below simple example.

Function Example()

make/o/n=100 w1
make/o/n=80 w2

w1 = x^2
w2 = sqrt(x)

w1[] = w2[p]
end

If I run this I get an index out of range error. If I change this to

Function Example()

make/o/n=100 w1
make/o/n=80 w2

w1 = x^2
w2 = sqrt(x)

w1[0,numpnts(w2)-1] = w2[p]
end

then everything is fine (of course). I understand that this latter approach is better because there is no ambiguity in the indexing. But I am wondering if something has changed to cause Igor to give errors more often when I have my indexing wrong.

Thanks!
In new experiments, Igor 6.3 adds a #pragma rtGlobals=3 statement to new procedure windows.

Read all about the ramifications (which includes the "Index out of range" checking), in your "What's Changed Since 6.1" help file, and scroll down to 6.30's "Changed Behavior" section.

To read about the "Changed Behavior" on the web:

http://www.wavemetrics.com/products/igorpro/newfeatures/whatsnew63.htm

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
Hello - I have a follow up question. I am getting an index out of range error when I attempt to place the values of a shorter wave into the middle of a longer wave.

Ex. (adapted from above)

w1[0 + 10, numpnts(w2) - 1 +10] = w2[p]

How can I avoid the index out of range error?

Thanks!

If you are getting "index out of range" then some index into w2 is outside the valid range: 0..(numpnts(w2)-1).

Quote:
w1[0 + 10, numpnts(w2) - 1 +10] = w2[p]


p is going from 10 up to and including (numpnts(w2)-1+10).

Probably you mean to write:
Quote:
w1[0 + 10, numpnts(w2) - 1 +10] = w2[p-10]


so that the indices used to index w2 go from 0 to (numpnts(w2)-1).