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

Home » Public Forums » archive » Text output line too short, width = val not working
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: Text output line too short, width = val not working [message #91107 is a reply to message #91105] Thu, 04 June 2015 02:02 Go to previous messageGo to previous message
vaibhavpant55 is currently offline  vaibhavpant55
Messages: 10
Registered: December 2014
Junior Member
On Thursday, June 4, 2015 at 5:51:11 AM UTC+5:30, laura...@gmail.com wrote:
> Hi,
>
> I'm writing an ascii file of data and some of the numbers are wrapping to a second line. On a couple of web pages, I find a suggested solution of adding width = somevalue to the end of my openw statement. I tried several different values, all the way up to 400, and found no change in my output. Any idea why this is? The relevant code and output lines are below. Interestingly, the header line (just text) prints out fine regardless of whether I use a width parameter.
>
> Code lines:
>
> openw, 4, outname + '.txt', width = 400
> printf, 4, ' Date DOY Time SZA Lat. Lon. Mask Type CF Height Pressure Temp Tau LWP r_e R_650 R_3.75 T_650 T_3.75'
> printf, 4, format = '(I4, 1X, 2(I3, 1X), I4, 1X, (A4, 1X), 2(F7.2, 1X), F7.2, 1X, 2(I4, 1X), F8.3, 1X, F8.3, 1X, F6.1, 1X, F6.1, 1X, F7.2, 1X, F7.2, 1X, F6.1, 2(1X, F7.2))', year, month, day, doy, time, outdata
>
>
> Example lines:
>
> Date DOY Time SZA Lat. Lon. Mask Type CF Height Pressure Temp Tau LWP r_e R_650 R_3.75 T_650 T_3.75
>
> 2015 2 3 34 2345 -999.00 -999.00 -999.00 -999 -999 -999.000 -999.000 -999.0 -999.0 -999.00 -999.00 -999.0 -999.00 -999.00
> -999.00 -999.00
>
> 2015 2 4 35 0015 38.54 -121.39 77.95 3 7 0.996 10.000 277.2 224.6 -999.00 -999.00 -999.0 26.75 27.24
> 282.35 268.82
>
>
> (If you can't see that properly in this window, only the last two numbers in each of the data "lines" is on a new line.) The crazy format statement comes from me trying to make the line as short as possible.
>
> Thanks,
>
> Laura

Hi,
I was also facing this problem. For me it is working with width. I am using IDL 8.4. Have you tried increasing width to 1000?
Vaibhav
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL v8 not recognizing bash environment variable
Next Topic: How to supress output from going to new line

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

Current Time: Fri Oct 10 06:34:06 PDT 2025

Total time taken to generate the page: 1.91739 seconds