Re: What could cause disappearing array? [message #69480 is a reply to message #69476] |
Tue, 19 January 2010 15:05   |
R.G.Stockwell
Messages: 163 Registered: October 2004
|
Senior Member |
|
|
"R.G. Stockwell" <noemail@please.com> wrote in message
news:hj5dpa$v8n$1@speranza.aioe.org...
>
> "Robin Wilson" <r.t.wilson@rmplc.co.uk> wrote in message
> news:z7GdnYab-uiEt8vWnZ2dnUVZ8jednZ2d@pipex.net...
>> Hi,
>>
>> I've got a very strange problem in one of my IDL programs. I have two
>> nested FOR loops with some processing happening in the inside loop, and
>> after a bit of processing one of my arrays seems to disappear.
>>
>> I've checked this with some strategically placed help statements, when it
>> seems to disappear it there (comes up with the right dimensions etc with
>> the help command) at the bottom of the loop, but by the time the loop
>> starts again it is showing as undefined.
>>
>> I was about to tell you how many iterations of my loop this occurred
>> after (by looking at the value of i and j when it crashed) but after it's
>> crashed I find i and j to both be equal to 0 - even though it's gone
>> through most of the loop already.
>>
>> I can't see anywhere in the code that I'm assigning anything to i or j.
>> I've left the FOR loop to look after them itself, yet somehow they end up
>> as 0.
>>
>> When I comment out all of the code inside the for loop then the loop runs
>> perfectly to the end, and i and j don't get reset to zero part way
>> through.
>
> So, comment out one line at a time, and see what happens. :)
>
> What does the output of those lines say (print, i,j, and the help
> commands).
> Are you saying that the array segment_image dissapears between the
> seg_id++ statement
> (the endfor) and the next print,i print,j,and help, statements?
>
> One note: that array is in a common block, who knows who else is
> manipulating it.
>
>
> One last thing: your comment and your statement don't match.
Oops. to elaborate on that (accidently sent the message)
Here.
; If one of the pixels had a inequality value greater than 1 then
continue
if inequality_result EQ 0 THEN CONTINUE
|
|
|