[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Input line too long???



[[ This message was both posted and mailed: see
   the "To," "Cc," and "Newsgroups" headers for details. ]]

Pavel, 
   Thanks, that worked like a charm!  Is there any way of doing the
same operation when the records are not all of the same length?  Just
curious.

david




In article <3975D9F7.7B28AC1B@cmdl.noaa.gov>, Pavel Romashkin
<promashkin@cmdl.noaa.gov> wrote:

> Hi David,
> I played with your example and I think I have a solution. The input
> buffer limitation is only in effect if you read formatted. I made a file
> by repeating your example line 2000 times, obtaining 10000 element line.
> Each record in your line is 8 bytes long, including a space. Try reading
> unformatted and it works perfectly:
> 
> ; Make fake data file with 1 line
> ; with 10000 data entries and open it.
> openr, unit, 'test.txt', /get_lun
> ; Since you know the number of data points, make X:
> x = strarr(10000)
> ; Fill X with 8 byte strings.
> x[*] = '12345678'
> readu, unit, x
> 
> Now you can convert X into float and use it.
> Cheers,
> Pavel
>

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
David Bowman         "Smash forehead on keyboard to continue."
Laboratoire Tectonique
Institut de Physique du Globe - Paris
4 Place Jussieu
75252 Paris Cedex 05
France