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

Home » Public Forums » archive » Re: What could cause disappearing array?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: What could cause disappearing array? [message #69481 is a reply to message #69480] Tue, 19 January 2010 15:04 Go to previous messageGo to previous message
R.G.Stockwell is currently offline  R.G.Stockwell
Messages: 163
Registered: October 2004
Senior Member
"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.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Reading DICOS format with IDL
Next Topic: Calculate sensor response functions

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

Current Time: Thu Oct 09 18:57:16 PDT 2025

Total time taken to generate the page: 1.59830 seconds