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 #67323 is a reply to message #67322] Thu, 16 July 2009 13:04 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wlandsman writes:

> 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 =3D {a:indgen(10),b:fltarr(100)}
> openw,lun,'test.dat',/get_lun
> writeu,lun,replicate(b,12)
> close,lun
>
> openr,lun,'test.dat'
> c =3D replicate(b,2)
> a =3D assoc(lun,c)
> print,size(a,/n_elements)
> print,N_elements(a)

Yes, but which is *correct*? :-)

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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:53:42 PDT 2025

Total time taken to generate the page: 1.28049 seconds