Re: Global variables and IDL [message #15152 is a reply to message #11537] |
Fri, 23 April 1999 00:00   |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
rmlongfield@my-dejanews.com wrote:
>
Hi Rose,
[...]
> Another problem with WIDGET_CONTROL (and I have seen others here with a
> similar problem when starting) is that the variable in the statement:
>
> WIDGET_CONTROL,event.id,GET_UVALUE= variable
>
> Can have ANY name. One can call it variablePTR or variableString or whatever.
> The name is completely irrelevent if what has been saved in this UVALUE is an
> integer.
that's probably unavoidable, since the programmer has to make some
decisions somewhere. But fortunately enough, IDL provides you with the
SIZE command (which has very useful keywords since 5.xx) so you can
always find out whether the UVALUE info is of type BYTE, INTEGER, LONG,
... POINTER (or even OBJECT ?) And if it is not what you thought it
should be, you either have more than 1 person muddling around with the
code or you are "actively enhancing your IDL skills" which means you
make so many changes to old programs that you loose control over all the
side effects ;-)
Martin.
--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-4551
e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
|
|
|