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

Home » Public Forums » archive » Re: IDL Structures
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: IDL Structures [message #1693 is a reply to message #1690] Thu, 10 February 1994 14:35 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
acdmi@kirk.giss.nasa.gov (Daniel M. Israel) writes:

> I've noticed that IDL seems to treat all structures as arrays of
> structures.

> Example:
> IDL> a={ new_structure, x : 1e0, y : 1e0 }
> IDL> help, /structure, a
> A STRUCT = -> Array(1)

> No matter what I do, I can't get a structure that doesn't think it is part
> of an array of one element. Now I do some things that require
> distungishing between scalars and arrays, where structures should be
> scalars. But IDL thinks all my structures are arrays of one elements. Is
> this a bug in my version? Or is it a bug in IDL? Or is there some reason
> why this notation is useful? (Because I have to kludge around it, it is
> definitely not useful for me.)

As far as I know, this is true of all versions of IDL. I don't know why this
is.

Actually, I'm not sure that it's really important to distinguish between
scalars and arrays that only have one element. It used to be important, but
later versions of IDL have been breaking down the distinctions. I've been
simply using the N_ELEMENTS() function lately to distinguish between arrays and
"scalars", rather than using the first element of the SIZE() function as I used
to do.

Of course, your mileage may vary. :^)

Bill Thompson
[Message index]
 
Read Message
Read Message
Previous Topic: coloring buttons (widgets)
Next Topic: Wavelet transforms

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

Current Time: Fri Oct 10 09:22:07 PDT 2025

Total time taken to generate the page: 0.48143 seconds