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

Home » Public Forums » archive » Re: Ascii-import
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: Ascii-import [message #32030 is a reply to message #32029] Tue, 10 September 2002 06:00 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning wrote:
> Thomas Jordi (tschordi@giub.unibe.ch) writes:
>
>
>> it may sound dumb but i have problems importing ascii.
>> The file I want to import looks like this
>>
>> /path/filename.file
>> /path/filename.file
>> ...
>>
>> when using the toolbar button, I get the desired input, a struct
>> containg a field with as much strings as lines in the file.
>> But i like to use the ascii_read function, and this just doesnt work.
>> Well, it does work with a template, but then again I'm using this
>> graphical interface which I dont want to use.
>>
>> There isn't a keyword in the read_ascii function, to say only on record
>> per row, each row is a recrod, at least I dont find it. Perhaps it has
>> something to do with the fact, that I want to import strings and not
>> integers.
>>
>> any help would be appreciated
>
>
> There are much easier ways to read this kind of data
> than READ_ASCII. Here is an example using the COUNT_ROWS
> program you can find on my web page:
>
> num_rows = Count_Rows(filename)
> data = StrArr(num_rows)
> OpenR, lun, filename, /Get_Lun
> ReadF, lun, data
> Free_Lun, lun
>
> Cheers,
>
> David


Dear David,

I believe you are telling from
http://www.dfanning.com/tip_examples/file_line.pro

or whats the difference.

regards

Reimar


--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Simple animation?
Next Topic: CW_Animate procedure...

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

Current Time: Sun Nov 30 09:46:22 PST 2025

Total time taken to generate the page: 1.52449 seconds