[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file output



bishop_98@my-deja.com (bishop_98@my-deja.com) writes:

> Hello all this may sound like a dumb question but this has been buggin
> me.  My problem is that when 've processed some thousand rows of data
> thats read into an array and wish to ouput it to a new file what happens
> is that the row doesn't fit on a line but rather goes over to the next
> line but i tried just printing out the values as is instead of the array
> and the exact same values fit.

IDL, like many computer programs first written in the era of
FORTRAN card decks, uses an 80-column line. (I always have
the idea that people who don't sign their names to newsgroup
posts are young kids who have missed out on far more than just
drugs, sex, and rock and roll from the sixties. They
missed out on etiquette too. Or, at least that is what I
imagine. I'm probably wrong.)

In any case, when IDL is writing data to a file in free-format
mode and it gets to the end of that 80 character line, it just
moves on to the next line, and continues in this manner until
it runs out of things to say.

If you want to make the line wider (sounds like you do), then
you can use the WIDTH keyword to make it as wide as you like:

   OpenW, lun, filename, /Get_Lun, Width=180

Cheers,

David
-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155