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

Home » Public Forums » archive » Re: Input buffer limits
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Input buffer limits [message #4410] Thu, 01 June 1995 00:00
knighton is currently offline  knighton
Messages: 12
Registered: June 1995
Junior Member
In <bowman-3105950847370001@csrp12.tamu.edu> bowman@csrp.tamu.edu (Kenneth P. Bowman) writes:

> I just ran into the 2048-byte input buffer limit and I can't remember
> whether there are any suggested workarounds.

> I'm trying to read an ASCII file with long records, and the error message is

> IDL> openr, 11, '94065V22.A01'
> IDL> x = FLTARR(1000)
> IDL> readf, 11, x
> % Input line is too long for input buffer of 2048 characters.
> % READF: Error encountered reading from file. Unit: 11
> File: 94065V22.A01
> % Execution halted at $MAIN$ (READF).


> Any suggestions?

IDL has two basic types of file i/o: Formatted and Unformatted

You are using formatted i/o which tries to read ascii values from lines that
end with new line characters. I assume that the file that you are trying to
read is a binary file with an array of floating point numbers in it. Therefore,
you get this error message because the line is too long (i.e. it doesn't end
with a new line character before the line length is exceeded).

Try using:

OPENU, lun, '94065V22.A01', /GET_LUN ;Open the file and get a LUN
x = FLTARR(1000) ;Make the array
READU, lun, x ;Read the array
FREE_LUN, lun ;Close the file and free the LUN

I hope that this helps.

Ken Knighton
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Contour filling in Polar Stereo
Next Topic: Contour filling in Polar Stereo

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

Current Time: Wed Oct 08 19:18:14 PDT 2025

Total time taken to generate the page: 0.00563 seconds