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

Home » Public Forums » archive » Writing a modified .txt file issue
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: Writing a modified .txt file issue [message #85387 is a reply to message #85384] Tue, 30 July 2013 03:38 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Tuesday, July 30, 2013 2:49:58 AM UTC-4, Ahmet Hakan BAYRAK wrote:

> And this is my output file: output.txt: In the output file I didn't remove header to show how it doesn't match.

Why don't you think that they match? Is it because the output file has numbers like 8.2000 while the input file has 8.2? You gave an output format of F12.5 which is why the output has 5 digits after the decimal point. As Phillip wrote earlier

*******************
For the output, Hakan, I would say those numbers *do* match, although they might be formatted differently. You'll want to use the FORMAT keyword, however you're writing the file back out if you want to match the numbers/decimal places/etc.

A simple example:
IDL> a = 13.2
IDL> PRINT, a
13.2000
IDL> PRINT, a, format='(F5.2)'
13.20
IDL> PRINT, a, format='(F4.1)'
13.2

You would do something similar using PRINTF.
*******************

Or is there some other reason why you think that the output doesn't match the input?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Find all user-defined structure definitions
Next Topic: Multiple plots with plot function

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

Current Time: Fri Oct 10 11:39:14 PDT 2025

Total time taken to generate the page: 1.04250 seconds