Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
TTS wrote: > 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 the binary key with openw R.Bauer
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