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

Home » Public Forums » archive » Printing multiple columns in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Printing multiple columns in IDL [message #61809] Wed, 30 July 2008 19:18 Go to next message
Ying Wu is currently offline  Ying Wu
Messages: 2
Registered: July 2008
Junior Member
Hello all, I'm having a problem with printing multiple columns in
IDL. The data I want to print to text is 300 columns, with 141 rows.
Right now it's printing them all out stacked on top of each other in
one column.
Re: Printing multiple columns in IDL [message #61918 is a reply to message #61809] Fri, 01 August 2008 08:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Joost Aan de Brugh writes:

> It is becoming more and more ironic. I tried Width=width + 2 and it
> works. But of course, that does not solve the problem. It only removed
> the symptom. Then I used the format statement.
>
> datalength = N_Elements(data[*,0])
> printf,lun,data,format=strjoin(['(',strtrim(string(datalengt h),
> 2),'G16.8))'])
> ; The format should make no sense because it is equal to the default
> format for the double array.
>
> Though it should make no sense, it works

Well, I don't know. I suspected extra spaces that you
weren't accounting for, so the width+2 thing doesn't
surprise me as much as it does you. I think the extra
space is confirmed by the fact that the format statement
works with the original width. That is, your assumption
that the default format is the same as exactly 16*num
spaces is probably incorrect, no matter what it looks like. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Edge detection and convert edges into polygons
Next Topic: WSHOW Problem Persists

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

Current Time: Fri Oct 10 18:33:00 PDT 2025

Total time taken to generate the page: 0.40028 seconds