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 #18600 is a reply to message #18588] Wed, 19 January 2000 00:00 Go to previous messageGo to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
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.
>
> "Why," you ask, "don't you just return it as a regular or keyword
> parameter?"
>
> "Simple," I say. "You don't always know how many variables you are
> going to return." Also, if it were a curve fitting program "for
> dummies" then I would want to make it as simple as possible.
>
> Incidentally, there is an internal IDL routine which *can* do this.
> Unfortunately you need to write a DLM to access it.
>
> Craig
>
> --
> ------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
> ------------------------------------------------------------ --------------

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)
The nice thing would be that you decouple the actual fitting process
from the
output, so you can access the fit result at any time (until you
obj_destroy
the fit object, of course). You could still write a
procedural/functional
interface for the object to prevent the "uninitiated" user from running
away.

Cheers,
Martin

PS: maybe I shut put a foot in my mouth, for I am talking so much about
objects these days but never supply any useful routines which make use
of them ;-( One day that will change for sure!...

--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[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: Sat Oct 11 00:07:54 PDT 2025

Total time taken to generate the page: 1.12330 seconds