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

Home » Public Forums » archive » Re: Testing the type of the structure?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Testing the type of the structure? [message #30461] Tue, 23 April 2002 00:28
P.T.Kenter is currently offline  P.T.Kenter
Messages: 2
Registered: April 2002
Junior Member
Thanks, that's it!

On Mon, 22 Apr 2002, Pavel A. Romashkin wrote:

> TAG_NAMES(a, /STRUCTURE_NAME), maybe?
> Cheers,
> Pavel
>
> "P.T.Kenter" wrote:
>>
>> Hi all.
>>
>> Can I test which type of structure a certain variable (parameters) is?
>>
>> For example, let's say i've got a variable a of type star:
>>
>> a = {star, name:'sirius', size:2.1}
>>
>> and a function that expects a star as input:
>>
>> function is_a_star, s
>> ; i would like to test here if s is of type 'star'
>> end
>>
>> How can i test if parameter s is a star-structure?
>>
>> I've found the obj_isa function but it only seems to work with objects. A
>> similar function for structures would be perfect.
>>
>> Regards, Pepijn Kenter.
>
Re: Testing the type of the structure? [message #30468 is a reply to message #30461] Mon, 22 April 2002 08:57 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
TAG_NAMES(a, /STRUCTURE_NAME), maybe?
Cheers,
Pavel

"P.T.Kenter" wrote:
>
> Hi all.
>
> Can I test which type of structure a certain variable (parameters) is?
>
> For example, let's say i've got a variable a of type star:
>
> a = {star, name:'sirius', size:2.1}
>
> and a function that expects a star as input:
>
> function is_a_star, s
> ; i would like to test here if s is of type 'star'
> end
>
> How can i test if parameter s is a star-structure?
>
> I've found the obj_isa function but it only seems to work with objects. A
> similar function for structures would be perfect.
>
> Regards, Pepijn Kenter.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Image analysis and ring identification
Next Topic: semi-transparent IDLgrPolygon? alpha blending no good...

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

Current Time: Wed Oct 08 18:41:37 PDT 2025

Total time taken to generate the page: 0.00727 seconds