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

Home » Public Forums » archive » Re: Creating Variables in Programs/ New: is this for objects?
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
Re: Creating Variables in Programs/ New: is this for objects? [message #12296] Tue, 14 July 1998 00:00
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
R. Bauer wrote:
>
> Martin Schultz wrote:
>
> [...]
>>
>> But I don't really see the point of the original question: why the h...
>> do you want to do this? To my knowledge, creating variables only makes
>> sense if you know what to do with them afterwards - and in order to do
>> something with them, you must know their name beforehand.
>> [...]

> Hi Martin,
>
> that's not totally correct.
> idl knows a lot of your variables which are defined or defined as undefined
> (a=n_elements(b))
>
> print,routine_names(/variables)

Guess you mean routine_info, but that's a minor detail. Yes, thanks for
this hint! After thinking about this a little more, I must confess that
there may well be applications that could use dynamically created
variables without having to know too much about them. E.g. from your
example: if you write a few general tools to convert data sets from
ASCII to binary format etc., you don't need to know what the variables
are, only their size and type. Or a temperature conversion routine would
not care whether it knows the name of the experimenter, it suffices if
it finds a param_unit entry with something it can handle.

Again, to my knowledge, this is the kind of thing that objects are all
about, but I never got around to try the IDL objects, nor did I ever
succeed in creating a real OOP application. It must be either my mind
that is just not wired for objects, or there *is* too much overhead for
a non-professional programmer to make much use of them. Maybe some of
the object guru's in thsi newsgroup would like to comment?

Reimar, if you don't mind sharing your code, I would indeed like to take
a look at it, because I might need something like this in the near
future (but we could discuss this in Juelich if you are around on the
24th of July).

Hope to see you soon,
Martin.

--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Earth&Planetary 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/
------------------------------------------------------------ -------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: DO_APPLE_SCRIPT questions...
Next Topic: Re: IDLDE on MacOS edit speed?

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

Current Time: Wed Oct 08 17:44:48 PDT 2025

Total time taken to generate the page: 0.00465 seconds