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

Home » Public Forums » archive » Re: Problem with IDL output files
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: Problem with IDL output files [message #13986] Thu, 14 January 1999 00:00 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
TTS wrote in message <77h5in$1ha@edrn.newsguy.com>...
> Hi there...!
>
> Using IDL 5.1 in a PentiumII NT 4.0 box this line of code:
>
> for i=0L, 307199 do printf, wlun, image(i), format='(I1)'
>
> create files with RETURN (\r) and LINE FEED (\n) terminations...
>
> How could I modify this so just RETURNS (^M) is used to finish
> the lines?

Use an unformatted write:

for i=0L, 307199 do begin
s = string(image[i], format='(I1)')
writeu, wlun, s, 13B
endfor

This may not be very fast! In principle, the following should be faster, but
you will find that the explicitly formatted string conversion is limited to
1024 lines.

writeu, wlun, string(image, format='(I1)')+string(13B)

AFAIK, you can't change the line terminator used by PRINTF

--
Mark Hadfield, m.hadfield@niwa.cri.nz http://www.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Mode????
Next Topic: Mode????

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

Current Time: Sat Oct 11 03:49:46 PDT 2025

Total time taken to generate the page: 0.40271 seconds