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 #93634 is a reply to message #93630] Wed, 14 September 2016 08:15 Go to previous message
Sapna Mishra is currently offline  Sapna Mishra
Messages: 66
Registered: December 2015
Member
On Wednesday, September 14, 2016 at 2:52:17 PM UTC+5:30, Markus Schmassmann wrote:
> 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

Thanks Markus, it helps...
[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 13:47:07 PDT 2025

Total time taken to generate the page: 0.00359 seconds