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

Home » Public Forums » archive » Array is empty after for loop
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: Array is empty after for loop [message #91499 is a reply to message #91482] Tue, 21 July 2015 07:56 Go to previous messageGo to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Monday, July 20, 2015 at 4:25:38 AM UTC-5, Dete van Eeden wrote:
> Hallo
>
> I have an array profile=fltarr(500,6)
>
> I read values into this array in a for loop
>
> for k=0,5 do begin
> for i=0,499 do begin
> profile[i,k] = i*k ;square brackets for array indexing
> endfor
> endfor
>
> help, profile
>
> while Im in the loop, there are values in the array profile but as soon as I exit the loop the whole array is empty?
>

What do you mean the array is empty? Is it not defined? Full of zeros? Listlessly wandering through life?

I have modified your code slightly above. What is the result?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Averaging values in an array
Next Topic: Getting Transects in IDL

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

Current Time: Fri Oct 10 04:31:29 PDT 2025

Total time taken to generate the page: 0.39701 seconds