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

Re: % Loop limit expression too large for loop variable type.



hua Guo wrote:
> 
> Dear all,
> I got this error message when I tried to run a program:
> 
> % Loop limit expression too large for loop variable type.
>   <LONG     (       54695)>.
> 
> What is wrong here? I am a beginner here. Thanks for any help.
> 
> Hua

If you have

  FOR i = 0, really_big_number - 1 DO BEGIN

change it to

  FOR i = 0L, really_big_number - 1 DO BEGIN



-- 
Paul van Delst           A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP        Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274  There shallow draughts intoxicate the brain,
Fax:(301)763-8545        And drinking largely sobers us again.
paul.vandelst@noaa.gov                   Alexander Pope.