Home »
Public Forums »
archive »
Re: Large array indices
Re: Large array indices [message #13160] |
Fri, 16 October 1998 00:00 |
Alex Schuster
Messages: 124 Registered: February 1997
|
Senior Member |
|
|
U Salford Guest Account wrote:
> Just a quick question...
>
> how do I (*is it possible*) create an array greater than 2^15?
Just do it :) arr = intarr( 100000 )
> And then how do I index it with a vaule greater than a int type?
You need to use longs instead of integers. The 10000 two lines above is
converted to a long, so this works. You just must be sure that you are
using longs, something like arr=intarr(2^16) doesn't work:
IDL> help, 2^16
<Expression> INT = 0
But it you make the 2 a long (by adding the L):
IDL> help, 2L^16
<Expression> LONG = 65536
This allows a maximum size of 2^32-1 bytes. If you need more, you have a
problem.
Alex
--
Alex Schuster Wonko@weird.cologne.de PGP Key available
alex@pet.mpin-koeln.mpg.de
|
|
|
Current Time: Fri Oct 10 20:14:14 PDT 2025
Total time taken to generate the page: 0.32011 seconds