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

Home » Public Forums » archive » Re: 'loop limit expression too large for loop variable type' error
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: 'loop limit expression too large for loop variable type' error [message #72322 is a reply to message #72319] Mon, 30 August 2010 08:47 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Aug 30, 12:36 pm, Snow53 <jennifer_wa...@hotmail.com> wrote:
> My code runs great on small data sets, but I'm trying to use it for
> larger sets and I've started getting an
> ''loop limit expression too large for loop variable type' error when I
> reach the "for j=0, num_ids-1 do begin".  Why is this happening and
> how can I fix it?

It appears that num_ids is 2^16 or larger, which would overflow the
loop variable initialized with the type int. Use instead

for j=0L, num_ids-1

Or add at the beginning

compile_opt idl2

or compile_opt defint32

Assuming it would fit into a long (2^32).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDLDE 8.0 Command Line Errors
Next Topic: multi plot with superposed axis

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

Current Time: Fri Oct 10 12:04:28 PDT 2025

Total time taken to generate the page: 1.03629 seconds