|
|
Re: Input Buffer Error Reading in Large ascii Files [message #26844 is a reply to message #26841] |
Fri, 28 September 2001 11:59  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
David Fanning <david@dfanning.com> writes:
> dave (gefinn@scifac.indstate.edu) writes:
>
>> unfortunately I get the following error.
>> % Compiled module: TRANSREAD.
>> % Input line is too long for input buffer of 32767 characters.
>>
>> Can anyone make a suggestion on why I am getting this error and a
>> possible work around?
>
> This kind of error often occurs when end-of-line
> characters are not in the file. This can occur,
> for example, by improper FTP transfer of an ASCII
> file from a Mac to a PC. Sometimes popping the file
> into a word processor on the target machine and saving
> it as a text file will get things sorted out.
>
> This doesn't exhaust the list of possibilities,
> of course, but I'm almost certain the problem is not
> with Craig's code. :-)
I am more than willing to believe it's a problem with my code. :-) But
I / we need more information before a judgement can be passed. Like,
which architecture is being used, what the input file looks like, etc.
One thing is that TRANSREAD is very line-oriented. It tries to read
one line at a time from the file into a string variable, and then to
parse it. For example, if Dave has a file with thousands of numbers
with no carriage returns, then TRANSREAD will fail because it tries to
read all the data at once. I can't really think of a way around this.
Yours,
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
|
Re: Input Buffer Error Reading in Large ascii Files [message #26847 is a reply to message #26846] |
Fri, 28 September 2001 07:13  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
dave (gefinn@scifac.indstate.edu) writes:
> unfortunately I get the following error.
> % Compiled module: TRANSREAD.
> % Input line is too long for input buffer of 32767 characters.
>
> Can anyone make a suggestion on why I am getting this error and a
> possible work around?
This kind of error often occurs when end-of-line
characters are not in the file. This can occur,
for example, by improper FTP transfer of an ASCII
file from a Mac to a PC. Sometimes popping the file
into a word processor on the target machine and saving
it as a text file will get things sorted out.
This doesn't exhaust the list of possibilities,
of course, but I'm almost certain the problem is not
with Craig's code. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
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
|
|
|