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

Home » Public Forums » archive » multiple delimiters
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: multiple delimiters [message #21772 is a reply to message #21677] Thu, 14 September 2000 00:00 Go to previous messageGo to previous message
meron is currently offline  meron
Messages: 51
Registered: July 1995
Member
In article <39C09FE1.C9E0B54@dkrz.de>, Martin Schultz <martin.schultz@dkrz.de> writes:
> nrh@imag.wsahs.nsw.gov.au wrote:
>>
>> Has anyone nutted out a way to read ASCII files with multiple
>> delimiters? Our current solution involves some messy string operations
>> that are restricted to 5.3, and I/O operations we would like to avoid.
>> Am I asking the impossible?
>>
>> Sent via Deja.com http://www.deja.com/
>> Before you buy.
>
> 1. Read the file line by line as strings
> 2. use my StrRepl function to replace all delimiters with one value
> e.g.
> line = StrRepl(line, ';',' ')
> line = StrRepl(line, ',',' ')
> line = StrRepl(line, ':',' ')
> 3. Use ReadS, Str_Sep or StrSplit (5.3) to extract the numbers.
> Caution: With Str_Sep or StrSplit you should always add a
> StrTrim(StrCompress(line),2) before
>
> You can find StrRepl at
> http://www.mpimet.mpg.de/~schultz.martin/idl/html/libmartin_ schultz.html
>
Or, you can use my STRPARSE, which takes any number of delimiters.

Mati Meron | "When you argue with a fool,
meron@cars.uchicago.edu | chances are he is doing just the same"
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: flow charts and IDL
Next Topic: Maximum ROI within an ROI

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

Current Time: Sat Oct 11 03:57:23 PDT 2025

Total time taken to generate the page: 0.72164 seconds