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

Home » Public Forums » archive » Re: FORMAT codes and tabs
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: FORMAT codes and tabs [message #15368 is a reply to message #15365] Mon, 10 May 1999 00:00 Go to previous message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
I have to deal with wierd file formats all the time. I found it to be
often easier to read the entire odd line into a string and then, using
byte convertion, eliminate unneeded characters and separate the string
into an array(s) of appropriate format. I have a simple code for
splitting a string at:
http://spot.colorado.edu/~romashki/idl/hc_str_to_arr.pro
It will do just what you want: separate a string at spaces and eliminate
one extra character of choice (tab in your case). It is not an elegant
solution but sometimes it was the simpliest way to go. You'd have to
place the output in proper places yourself but that's minor I think.
Cheers,
Pavel

Justin Ashmall wrote:

> Dear All,
>
> I'm having trouble reading in a text file with dates and times in the
> form:
> 11/10/99<tab><sp>16<sp>:<sp>47
> where <tab> and <sp> represent tabs and spaces.
> Sometimes the day/months are consist of only 1 char (e.g. 3/4/99). I
> can write a separate FORMAT statement for each case but when I try to
> use I0 to deal with both cases it doesn't work and it seems to be due
> to the TAB char.
[Message index]
 
Read Message
Read Message
Previous Topic: Experimental FAQ relocation (PROXY solution)
Next Topic: Help: antenna pattern plotting (polar plots)

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

Current Time: Mon Apr 27 20:27:21 PDT 2026

Total time taken to generate the page: 1.19896 seconds