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

Home » Public Forums » archive » Type define
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
Type define [message #14755] Thu, 25 March 1999 00:00 Go to next message
VU KHAC Tri is currently offline  VU KHAC Tri
Messages: 25
Registered: March 1999
Junior Member
Hi,

In C, we can define sth like
#typedef A ....
And in IDL, is this possible ?

Thanks,

Best regards,
Tri.
Re: Type define [message #14816 is a reply to message #14755] Fri, 26 March 1999 00:00 Go to previous message
mallors is currently offline  mallors
Messages: 76
Registered: November 1997
Member
In article <7defbt$bfh$1@nnrp1.dejanews.com>,
philaldis@geocities.com writes:
> In article <7dd6id$a4m@hermes.fundp.ac.be>,
> "Tri VU KHAC" <tvk@info.fundp.ac.be> wrote:
>> Hi,
>>
>> In C, we can define sth like
>> #typedef A ....
>> And in IDL, is this possible ?
>>
>> Thanks,
>>
>> Best regards,
>> Tri.
>>
>>
> [text cut]
>
> because most of the time your variables are defined by
> what is passed into
> them. You can even call a function like this:
>
> CurrentlyUndefinedVariable = N_Elements([1,2,3])
>
> ....and even though CurrentlyUndefinedVariable had never
> been mentioned anyway
> before in your code, it is now a integer. This is one of
> the great features of
> IDL because it you gives you such flexibiltiy.


Not to be too picky, but N_Elements () will return
CurrentlyUndefinedVariable as a LONG, not an INT.
For someone new to IDL this might cause confusion.

Although most of the time this flexibility is nice, it
can bite you if you are not careful. If it does, it
can produce a bug that can be *very* difficult to
find ... I know from experience ;-)



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
Robert S. Mallozzi 256-544-0887
Mail Code ES 84
Work: http://www.batse.msfc.nasa.gov/ Marshall Space Flight Center
Play: http://cspar.uah.edu/~mallozzir/ Huntsville, AL 35812
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: MORE FIELDS IN FSTAT() (Was: Getting File creation data/time)
Next Topic: envi animation to avi?

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

Current Time: Wed Oct 08 13:38:39 PDT 2025

Total time taken to generate the page: 0.00499 seconds