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 #32031 is a reply to message #32030] Tue, 10 September 2002 05:59 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[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 05:31:02 PST 2025

Total time taken to generate the page: 2.31647 seconds