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

Home » Public Forums » archive » Arrays of 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: Arrays of Structures [message #52451 is a reply to message #20472] Thu, 08 February 2007 11:27 Go to previous messageGo to previous message
Mick Brooks is currently offline  Mick Brooks
Messages: 4
Registered: February 2007
Junior Member
On Feb 8, 7:09 pm, "R.G. Stockwell" <n...@email.please> wrote:

>> ... but this is where you lose me. Doesn't the the first line that you
>> showed say that structs.a is an array of 50 ints?
>
> Not exactly. The key point is that structs.a is an EXPRESSION.
> Also, "struct" is an array of structures.

Yes, this struck me as I drove home from work. I don't have IDL here,
but will be trying
IDL> INDGEN(50)[23]
first thing in the morning

> You cannot do
> IDL> EXPRESSION(10)
> , you must first cast the expression
> IDL> (EXPRESSION)[10]
>
> It is not an operator precedence thing.

Yes, I'd looked at the precedence table and made the same conclusion
as you and Paulv.

All that's left is to explain why we get the extra leading dimension
when subscripting an expression-which-evaluates-to-an-array-of-ints
thing (i.e. structs.a) with multiple indices (or [*]).
This was the actual question I was asked by a user of the module I'd
written - he was seeing these extra leading dimensions, and queried
whether my structure was somehow broken. I couldn't answer, and so
came up with the simpler case we're discussing.

Thanks for all your help,

Mick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: image rotation Fits headers?
Next Topic: .sav format

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

Current Time: Sat Oct 11 13:43:05 PDT 2025

Total time taken to generate the page: 1.11977 seconds