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

Home » Public Forums » archive » Re: Giant arrays!
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: Giant arrays! [message #9403 is a reply to message #9395] Mon, 30 June 1997 00:00 Go to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Ben Krasnow (kraz@wco.com) wrote:
: Hi all! I am new to PV-WAVE, and I have a 'can it do this' question:
: I made a simple program that loads a three dimensional(256x256x30
: images) image array, selects one image, and then uses assoc to 'copy'
: one of the images to a two dimensional array. Next I want to transfer
: that into a one-dimensional array so I can use sort on it. the problem
: is the one-dimensional array has to be 65536 elements, to hold the
: single 256x256 image's data. PV-WAVE bombs, and says something to the
: tune of 'too many elements'. Is there another way to do this, without
: breaking the array up(I have to use sort on it)? Thanks

You are probably doing something like

b = fltarr(256*256)

Unfortunately, this bombs because 256 is intepreted as a short integer,
then 256*256=0. If instead you do

b = fltarr(256L*256)

everything will work just fine. Wave, and IDL, can create arrays up to
the memory size of your machine.

Peter

P.S. Anybody else want to join in a campaign for a system variable that
switches the default literal integer to long rather than short? I've
been bit too many times...
[Message index]
 
Read Message
Read Message
Previous Topic: Re: IDL 5.0 - call_external under Win95/NT
Next Topic: A Minor Addition to IDL Syntax

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

Current Time: Sat Oct 11 08:06:11 PDT 2025

Total time taken to generate the page: 0.88012 seconds