comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: error: subscript range values of the form low:high must be >= 0, < size
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: error: subscript range values of the form low:high must be >= 0, < size [message #63191] Fri, 31 October 2008 12:40
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
Yes, but you should do that outside the debugger.

Paolo

frankosuna wrote:
> Yeah I did that already, I get the right values. There's something
> weird going on here because when I step through the code with the
> debugger the error isn't thrown. Maybe some data type error?
Re: error: subscript range values of the form low:high must be >= 0, < size [message #63192 is a reply to message #63191] Fri, 31 October 2008 12:18 Go to previous message
frankosuna is currently offline  frankosuna
Messages: 31
Registered: February 2008
Member
Yeah I did that already, I get the right values. There's something
weird going on here because when I step through the code with the
debugger the error isn't thrown. Maybe some data type error?
Re: error: subscript range values of the form low:high must be >= 0, < size [message #63193 is a reply to message #63192] Fri, 31 October 2008 11:31 Go to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
Well, to debug this program, add a
print,numClicks
statement in the if clause and you'll see what's going on...

Ciao,
Paolo

frankosuna wrote:
> I am trying to store values into a array of type long but I keep
> getting the following error:
> subscript range values of the form low:high must be >= 0, < size, with
> low <= high: ROIPIXELS.
> The weird thing about it is when I set a breakpoint and step through
> the code it doesn't throw the error anymore. Also, if instead I don't
> use numClicks as the index and hardcode a 0 or 1 or 2...etc the code
> works as well!!!
>
> HELP!!!!!!!!!
>
> roiPixels = LONARR(5,25)
> numClicks = 1
>
> WHILE(!mouse.button NE 4) DO BEGIN
> CURSOR, xi, yi, /DEVICE
> IF(!mouse.button EQ 1) THEN BEGIN
> x = LINDGEN(5*5) MOD 5 + xi
> y = LINDGEN(5*5) / 5 + yi
> roiPixels[numClicks,*] = x + y * 1024
> numClicks++
> ENDIF
> ENDWHILE
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: New Widgets Needed
Next Topic: Re: compiling external programs 64 bit OS X

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 14:15:18 PDT 2025

Total time taken to generate the page: 0.24134 seconds