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

Home » Public Forums » archive » Printf and line breaks
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
Printf and line breaks [message #23244] Fri, 19 January 2001 11:52
s007amf is currently offline  s007amf
Messages: 8
Registered: January 2001
Junior Member
Sorry to bother everyone again. I am just beginning my enduring journey of
learning IDL and keep running into obstacles.

My current problem is with printf. I am trying to create a text output
file that can be imported into a spreadsheet. My problem is that printf is
automatically line wrapping. For example:

printf, filetpr, val1, val2, val3, val4, val5, val6,

is producing output where val1, val2, val3, and val4 are on a single line.
But, val5 and val6 are placed on the following line. NOTE: I am actually
trying to print 10 different floats on the same line.

I did think about converting all the values into one long string and
printing that string. But, this issue was still a problem.

Anyone have any ideas about how to fix this? Is a solution even possible?


Thanks,


Alan
Re: Printf and line breaks [message #23245 is a reply to message #23244] Fri, 19 January 2001 11:13 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
ALAN FRAZIER (s007amf@news.wright.edu) writes:

> Sorry to bother everyone with another question. But, I am just at the
> beginning of the enduring process of learning IDL.

Yeah, you and me, both. :-)

> My current problem is with printf. I am trying to create a text output
> file that can be easily imported into a spreadsheet. From what I can
> tell, printf automatically line wraps after 80 or so characters. For my
> output, I want printf to print everything on the same line. I am
> wondering if anyone knows how to do this or if this is even possible?

When you open the file for writing, set the WIDTH keyword to
as wide a line as you need. 80 columns is the default
for historical reasons. (Are you old enough to remember
punch cards?)

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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Printf and line breaks
Next Topic: z-buffer and pattern, modified vowels

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

Current Time: Fri Oct 10 06:53:30 PDT 2025

Total time taken to generate the page: 1.36959 seconds