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

Home » Public Forums » archive » Re: 4 byte integers
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: 4 byte integers [message #66966 is a reply to message #66822] Mon, 15 June 2009 03:10 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Jun 13, 1:26 am, Mike Galloy <mgal...@gmail.com> wrote:
> On Jun 12, 5:19 pm, Joshua Von Korff <joshlegan...@hotmail.com> wrote:
>
>> Is there any way I can set a flag to force IDL to consider all
>> integers as having 4 bytes? It's happened many times that I assume a
>> number won't go above 32768, and then months later, it does go above.
>> This produces an error that can be annoying to track down. So I've
>> taken to writing 0L, 1L, 2L, lindgen() at all times, but sometimes I
>> forget. Any thoughts?
>
> Try "comile_opt defint32" (or "compile_opt idl2" which also throws in
> the "strictarr" option which I recommend):

[snip]

> The catch is that it still needs to be done on a routine by routine
> basis (there is no "master switch" to throw for this).

For interactive use, you can put the compile_opt idl2 in your startup
script. This will cover the command-line, but not compiled functions
as Mike already said. I wish there was a master switch, and for float/
double as well.

Maarten
[Message index]
 
Read Message
Read Message
Previous Topic: Re: How to visit www.dfanning.com?
Next Topic: yet another idl memory question

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

Current Time: Fri Oct 10 01:26:19 PDT 2025

Total time taken to generate the page: 1.11538 seconds