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

Home » Public Forums » archive » Re: tab delimited text 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: tab delimited text files [message #8929] Fri, 09 May 1997 00:00
agraps is currently offline  agraps
Messages: 35
Registered: September 1994
Member
jones@mpipsykl.mpg.de (Richard Jones) writes:

> I now need to generate data for
> a programme which requires tabs between the data columns, can anyone
> enlighten me as to how I can do this using printf (or other IDL routines
> if necessary). By the way I am using antiquated IDL 4.01.


It is such a common usage thing, there should be an example in the IDL
manuals, but I've never seen one.

tabchar = STRING(9B) ;This defines the tab character (to
;put in output between vars)


Then you could cycle through an array (call it 'row' of length 5) and
print the values with a format:

form = '$(E10.4)'
textfl= ''

FOR i = 0, 4 DO BEGIN
textfl = textfl + STRING(FORMAT = form, row(i))
textfl = textfl + tabchar
END ;FOR i

PRINTF, lun, textfl

You'll have an extra tab at the end of your row, but this is one way
to automatically print tab-delimited values to an ascii file.

Amara


--

************************************************************ *************
Amara Graps email: agraps@netcom.com
Computational Physics vita: finger agraps@best.com
Multiplex Answers URL: http://www.amara.com/
************************************************************ *************
[Message index]
 
Read Message
Previous Topic: EOF Analysis
Next Topic: Re: Re to David Fanning

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

Current Time: Fri Oct 10 03:09:53 PDT 2025

Total time taken to generate the page: 0.24159 seconds