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

Home » Public Forums » archive » Re: checking the data type in IDL
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: checking the data type in IDL [message #67890 is a reply to message #67879] Tue, 08 September 2009 02:25 Go to previous message
Dandelion is currently offline  Dandelion
Messages: 1
Registered: September 2009
Junior Member
On Sep 8, 12:30 am, "b.a" <u4565...@anu.edu.au> wrote:
> Hi,
>
> In the middle of my IDL program, I need to check the type of a
> variable in order to decide what to do with it. I mean, I have to
> check whether variable1 is a STRING or FLOAT (for example). Like this:
>
> IF variable1 "is STRING' do .....
> else do ...
>
> Of course "help, variable1" will not help as it shows the answer on
> the consol and I can't use it that way. If anybody knows how to do so,
> please let me know. Thanks.
>
> Cheers

Use the SIZE function with the TYPE keyword to return the type code
for an IDL variable. If you search -data type- or -size- in the IDL
help, you will find more details.

~D
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Reading ASCII Data Files in IDL
Next Topic: idl_lmgrd memory leak

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

Current Time: Sat Oct 11 20:20:06 PDT 2025

Total time taken to generate the page: 1.53394 seconds