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

Home » Public Forums » archive » Re: End of File-Error message in simple readf routine - What's the problem?
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: End of File-Error message in simple readf routine - What's the problem? [message #55346 is a reply to message #55343] Sun, 19 August 2007 05:57 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
bmey@uni-mainz.de writes:

> i'm sorry to post a new message, but i did not find the answer to my
> question, when i searched for it (or i did not use the fitting words
> for the search).
>
> I try to read the values of a file with three columns and 2072758 rows
> (the file was created from a bmp-picture by the routine read_bmp).
>
> My code is as follows:
>
> file='E:\Dissertation\mz_cam\spectral_calib\dat-files
> \070807\run24\070807_24_0013.dat'
>
> n_pixel= 2072758

You will certainly need that "L" on your counting loop.
But my theory is that you do not have the compiler option
DEFINT32 on, so that your n_pixel value is being converted
to a short integer. In other words, 2072758 is being represented
in your program as the number 10650.

The best solution, I think, is to turn all integers into
32-bit integers with a compiler option. Then your counter
will be right automatically, too. Put this line at the
top of your code:

COMPILE_OPT DEFINT32

Or, you could make this n_pixel value a long integer directly:

n_pixel= 2072758L

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to study IDL?
Next Topic: error message:unable to allocate memory

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

Current Time: Fri Oct 10 19:58:41 PDT 2025

Total time taken to generate the page: 0.32379 seconds