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

Home » Public Forums » archive » Re: How to check variable type?
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: How to check variable type? [message #40517 is a reply to message #40504] Fri, 13 August 2004 18:26 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <512b0d8b.0408131520.46e68fbd@posting.google.com>,
biophys@gmail.com (biophysics) wrote:

> Hi, guys
>
> I want to write a function that processes data very differently
> according to the type. But How do I check the type inline? I couldn't
> find any clue by a quick look through the function list. Can anybody
> give me some hints?
>
> thanks!

You mean it isn't obvious that you use SIZE to get the variable type?

CASE (SIZE(var, /TNAME) OF
'UNDEFINED' : ...
'BYTE' : ...
.
.
.
ELSE : ...
ENDCASE

To make it more obscure, you can use type codes instead of type names.
;-)

Regards, Ken Bowman
[Message index]
 
Read Message
Read Message
Previous Topic: animate loaded images
Next Topic: Re: animate loaded images

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

Current Time: Sun Oct 12 04:51:19 PDT 2025

Total time taken to generate the page: 0.40300 seconds