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

Home » Public Forums » archive » Re: SIZE() vs. N_ELEMENTS()
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: SIZE() vs. N_ELEMENTS() [message #67324 is a reply to message #67323] Thu, 16 July 2009 12:59 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Jul 16, 2:39 pm, wlandsman <wlands...@gmail.com> wrote:
   Is there any situation now where
> one must use SIZE() to get the number of elements rather than
> N_ELEMENTS().      

Immediately after posting I realized that the answer to the above
question is "yes". In the following code using ASSOC(), N_Elements(a)
equals 1, but size(a,/N_elements) equals 2. --Wayne


b = {a:indgen(10),b:fltarr(100)}
openw,lun,'test.dat',/get_lun
writeu,lun,replicate(b,12)
close,lun

openr,lun,'test.dat'
c = replicate(b,2)
a = assoc(lun,c)
print,size(a,/n_elements)
print,N_elements(a)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Best form factor for a NetCDF package of a dataset
Next Topic: Re: Linear fit with user defined weights

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

Current Time: Sat Oct 11 07:54:13 PDT 2025

Total time taken to generate the page: 1.11858 seconds