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

Home » Public Forums » archive » Re: Formatting WRITE_CSV output
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: Formatting WRITE_CSV output [message #70896 is a reply to message #70888] Wed, 12 May 2010 18:32 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On May 12, 10:00 pm, fgg <fabioguimaraesgoncal...@gmail.com> wrote:
> Hi,
>
> Is it possible to use format codes with WRITE_CSV? In other words, can
> I specify the output format for each "Data" below?
>
> WRITE_CSV, Filename, Data1  [, Data2,..., Data8] [, HEADER=variable]
>
>  Thank you!

Not directly. If your data are strings, you can format them first,
then give them to write_csv, such as

write_csv,file,string(data1,format=...),string(data2,format= ...)

But write_csv encapsulates strings in quotes, which is probably
undesirable if your data were not strings.

So it is probably better to use plain old printf with the format you
want plus the commas to separate the fields.
[Message index]
 
Read Message
Read Message
Previous Topic: Help on EDGE_DOG
Next Topic: quit/close events on mac

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

Current Time: Sat Nov 29 01:59:56 PST 2025

Total time taken to generate the page: 1.28426 seconds