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

Home » Public Forums » archive » Re: Reading multiple ASCII files in as 2d arrays and putting them into a 3d 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: Reading multiple ASCII files in as 2d arrays and putting them into a 3d array [message #65185 is a reply to message #65179] Mon, 16 February 2009 12:06 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Spon writes:

> you need to stick this line:
> data =3D fltarr(10,nstar,nfiles)
>
> outside your FOR loop, so you don't keep re-defining it (full of
> zeroes) at every iteration.

Stefan, it is hard for me to know if the code
you posted is the actual code you use, but if it
is, I remind you that many of these kinds of errors
can be fixed, or at least spotted a hell of a lot
easier, if the code has a bit of "style" to it.
In this case, I am talking about indenting the
contents of loops.

Some people think style is a matter of an anal
personality run amuck. And I suppose it sometimes is.
But it is also a way of organizing your thoughts on
paper (or computer screen, as the case may be), and
as such it can be an enormous help writing something
as literal as instructions to a computer.

Just thought I would mention it. :-)

Cheers,

David

P.S. You can find many styles by reading the code
of any IDL library. In fact, you will sometimes be able
to date the code by the style in current use. *Which* style
to choose is almost irrelevant. Any style used consistently
will work for the purpose.

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Creating a composite image, avoid fill data values
Next Topic: Re: another IDL oddity

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

Current Time: Thu Oct 09 20:44:08 PDT 2025

Total time taken to generate the page: 0.56002 seconds