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

Home » Public Forums » archive » IDL structure problem
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 structure problem [message #93630 is a reply to message #93629] Wed, 14 September 2016 02:22 Go to previous messageGo to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
On 09/14/2016 09:16 AM, Sapna Mishra wrote:
> I have a structure STR which has 43 tags.
> IDL> print,N_tags(STR)
> 43
>
> IDL> PRINT, TAG_NAMES(STR)
> SLIT_ID XTOP YTOP........ROW_9
>
> I want to print value of ith tag of STR without mentioning the
> Tag name. Can any one help??
>
> can I do something like this?
> IDL> print,STR.(ith_tag_name)

A tag can be referenced using its index rather than its tag name. The
tag index should be enclosed in parentheses, as follows:

Variable_Name.(Tag_Index)... ... ...

The Tag_Index ranges from zero to the number of fields minus one.

Note: The Tag_Index is an expression, the result of which is taken to be
a tag position. In order for the IDL parser to understand that this is
the case, you must enclose the Tag_Index in parentheses. This is not an
array indexing operation, so the use of square brackets [ ] is not
allowed in this context.

[1] http://www.harrisgeospatial.com/docs/Structure_References.ht ml
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Fitting curve to data
Next Topic: help needed in understanding correl_images

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

Current Time: Wed Oct 08 17:31:59 PDT 2025

Total time taken to generate the page: 0.00416 seconds