Re: Loop Limit Error [message #18164] |
Thu, 02 December 1999 00:00 |
m218003
Messages: 56 Registered: August 1999
|
Member |
|
|
In article <3846084D.C11E61F0@ngdc.noaa.gov>,
Eric Kihn <ekihn@ngdc.noaa.gov> writes:
> All,
>
> Greetings. The function attached below is giving me the following
> error:
>
> % Loop limit expression too large for loop variable type.
> <LONG ( 35038)>.
> % Execution halted at: MAKEREGULARSTEP 40
> C:\kp\idl\makeRegularStep.pro
>
All I can say is:
Change this:
> zsize = size(hist, /N_Elements);
> for i = 0 , zsize -2, 1 do begin
to:
zsize = size(hist, /N_Elements);
for i = 0L , zsize -2, 1 do begin ; 0L !!!
Although 35038 is still less than 2^15-1, it's pretty darn close ;-)
Good luck,
Martin
--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
|
|
|
Re: Loop Limit Error [message #18171 is a reply to message #18164] |
Wed, 01 December 1999 00:00  |
Anton Ivanov
Messages: 4 Registered: June 1997
|
Junior Member |
|
|
Eric,
try
pkp79 = makeRegularStep(pkp.propTime[10880L:42511L],
^ ^
Otherwise IDL thinks you're using a 4 byte signed integer with range -32768
+32768
Hope, this helps
Anton
Eric Kihn wrote in message <3846084D.C11E61F0@ngdc.noaa.gov>...
> All,
>
> Greetings. The function attached below is giving me the following
> error:
>
> IDL> pkp79 = makeRegularStep(pkp.propTime[10880:42511],
> pkp.pkp[10880:42511], 15)
> % Loop limit expression too large for loop variable type.
> <LONG ( 35038)>.
> % Execution halted at: MAKEREGULARSTEP 40
> C:\kp\idl\makeRegularStep.pro
> % $MAIN$
>
|
|
|