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

Home » Public Forums » archive » Re: A very simple FORMAT question
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: A very simple FORMAT question [message #39112 is a reply to message #39111] Thu, 22 April 2004 01:20 Go to previous messageGo to previous message
wmconnolley is currently offline  wmconnolley
Messages: 106
Registered: November 2000
Senior Member
"Andry William (Please remove \".spam\")" <andry> wrote:
> wmc@bas.ac.uk wrote:
>>> ------------------------ test.datos ----------------------------
>>> |020922 10:00:00 | 339| 348| 63| 356| 400| 88|
>>> ------------------------ End data ------------------------------
>>
>>> data= INTARR(11, lineas)
>>> READF, 1, data, format= '(1x,i6,3(1x,i2),4x,7(1x,i6))'
>>
>> I count 10 not 11?
>> should be 6 not 7(ix,i6)?

> You are right. It was just a mistyping on the e-mail editor. The
> original code has the above variables.
>>
>> BTW, you could start of with
>>
>> spawn,"perl -i -pe 's/|:/ /g' test.datos"
>>
>> which would change your : and |'s into spaces, whereupon your
>> reading could be simplified.

> Does it make some difference if I have "|" or ":" instead of
> space?

Not as you've written it. But if you read in as

data= INTARR(11, lineas)
readf,1,data

and skip the format (as you can if you've removed the |'s etc in favour
of spaces) you have a simpler life.

> On the other side, the data I have come from some other database
> software and generated by some other people with a lot more data.
> I am also not supposed to alter the data since after my checking
> I should pass it to another program (with the original format),
> pretty picky (I agree).

-W.

--
William M Connolley | wmc@bas.ac.uk | http://www.antarctica.ac.uk/met/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
I'm a .signature virus! copy me into your .signature file & help me spread!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: simplify a polyline?
Next Topic: Newbie needs help getting mpi_plot going

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

Current Time: Sun Oct 12 03:57:34 PDT 2025

Total time taken to generate the page: 1.11905 seconds