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

Home » Public Forums » archive » Re: ASCII data with 5000 columns
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 data with 5000 columns [message #14604 is a reply to message #14598] Thu, 11 March 1999 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
R.Bauer wrote:
>
> Hi,
>
> how to read an ASCII datafile with 5000 data coloumns.
> The length of each line is about 56400 characters or longer.
>
> reads, readf don't work because the max stringlenth is exceeded.
>
> The only way I know to read is readu.
> I separate the numbers in the byte array convert them to string and at
> last to
> float.
>
> It's a bit unbelievable that's idl is able to handle more than 2 Giga
> Byte but only if they are organized by rows and a few columns.
>
> R.Bauer

Hallo Reimar,

maybe you can use string arrays and the format statement? Here's an
example:
a=replicate('*',62000L)
b=string(a,format='(32000A1)')

will give you a two-element string array.

Even better of course to have a formatted file where you can assign the
format statement to individual tags (e.g. 5000A8)

try: c=strarr(5000)
readf,ilun,c,format='(5000A8)'

Hoffe, das hilft,
Viele Gruesse,
Martin.

--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-4551

e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Colour maps overlaid on grey-scale (medical) images
Next Topic: Looking IDL-code for matching XY-lists.

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

Current Time: Tue Dec 02 21:55:02 PST 2025

Total time taken to generate the page: 0.79873 seconds