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

Home » Public Forums » archive » Re: how to find the size of the array
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: how to find the size of the array [message #2060 is a reply to message #2052] Sat, 21 May 1994 09:26 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
vshvetsk@fourier.oac.uci.edu (Victor Shvetsky) writes:


> I am currently writing a routine for our astrophysics department and I found
> a little question:
> is there a way to find out the size of the array from within the program?
> For example: help, array gives you array(50,50)
> Now, how can I get those dimensions into the variable?

> Thanks in advance
> Victor

The SIZE() function returns this information. For example,

IDL> SZ = SIZE(ARRAY)
IDL> PRINT, SZ
2 50 50 4 2500

The first element gives the total number of dimensions (zero for scalars).
Following this are the dimensions, 50x50 in this example. Then there is a code
specifying what the data type is--see the manual for details. The last number
gives the total number of elements in the array.

Bill Thompson
[Message index]
 
Read Message
Read Message
Previous Topic: widget library cross-platform compatibility
Next Topic: Angstrom sign

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

Current Time: Sat Oct 11 09:46:16 PDT 2025

Total time taken to generate the page: 1.59984 seconds