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

Home » Public Forums » archive » Re: Accessing "main" level variables
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: Accessing "main" level variables [message #18595 is a reply to message #18588] Wed, 19 January 2000 00:00 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Martin Schultz <martin.schultz@REMOVE.dkrz.de> writes:

> Craig Markwardt wrote:
>>
>> [...]
>>
>> I like your questino. I know I will get flamed for saying it, but I
>> think there are some times when it is desireable for a program to
>> deposit its results into the main level. For example, a fully canned
>> curve fitting program may want to return the fitting results. This
>> should of course be done with full control and permission of the user.
>> ... portion deleted ...
>
> No! No flaming. But as you describe it, the solution to your problem
> would
> sound like almost the typical object oriented approach. Simple enough,
> too,
> once the user understands he/she has to write
> obj_fit->get_parameter,a0=a0,m=m
> (or something similar)
> ... portion deleted ...

I agree with you from a *programmer's* point of view. A programmer
wants a clean programming interface with predictable behavior.
Clearly a procedure that modifies external variables goes against this
ideal.

HOWEVER, from a lowly *user's* perspective, I assert that sometimes it
would be nice for a program to manipulate some main level variables
for me. I know, because I'm both a programmer and a user. Querying
objects as you suggest, while linguistically pure, will get stale
pretty quickly while I am working interactively at the command line.

In the back of my mind I would like to write a nice graphical curve
fitting application using MPFIT, and I want it to be simple simple
simple. The question is, how do I get the results out once the fit is
finished?

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: best way to ps an image
Next Topic: IDL mode in emacs and objects?

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

Current Time: Thu Oct 16 04:48:13 PDT 2025

Total time taken to generate the page: 1.68026 seconds