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.
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. [message #24885 is a reply to message #24880] Mon, 30 April 2001 10:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
hua Guo (gh75@usa.net) writes:

> 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.

Normally, any integer in IDL is a short (two byte)
integer, including integers in loop expressions.
You need your loop variables to be LONG (four byte)
integers. You can set this up in one of two different ways.

The most common way is to force the loop expression
to be a long integer:

FOR j=0L, n DO Whatever

The second is to make ALL integers in your program
be long integers. You do this by putting a COMPILE_OPT
statement in your program module:

PRO JUNK
Compile_Opt defint32

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: how to speed up multiple regressions?
Next Topic: % Loop limit expression too large for loop variable type.

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

Current Time: Wed Oct 08 20:14:53 PDT 2025

Total time taken to generate the page: 0.01850 seconds