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

Home » Public Forums » archive » 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
Testing the type of the structure? [message #30469] Mon, 22 April 2002 08:48
P.T.Kenter is currently offline  P.T.Kenter
Messages: 2
Registered: April 2002
Junior Member
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: High Quality Frame Grabber Suggestions
Next Topic: How to keep x-axis and y-axis ratio consistant?

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

Current Time: Fri Oct 10 00:33:49 PDT 2025

Total time taken to generate the page: 2.02189 seconds