[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: subtle but important
Randall Skelton <rhskelto@atm.ox.ac.uk> writes:
> On Fri, 27 Apr 2001, Liam E. Gumley wrote:
>
> > This is a subtle but important point. DOUBLE() is a type conversion
> > function [snip]
>
> While we are on the subject of 'subtle but important points' in IDL...
>
> I also learned today that for integers the default length is 16-bit unless
> you use the "COMPILE_OPT DEFINT32" statement. Try "print, 1000*1000" in
> IDL.
That's why I often use "print, 1000L*1000L". Appending "L" to
integers saves a lot of grief later on. The COMPILE_OPT approach
works in newer versions, but not in IDL 5.2 or older.
Craig
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------