[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accessing "main" level variables
- Subject: Re: Accessing "main" level variables
- From: mallors(at)ips1.msfc.nasa.gov (Robert S. Mallozzi)
- Date: 18 Jan 2000 22:57:59 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: http://www.msfc.nasa.gov/
- References: <3883C97E.8DA692CE@home.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:18061
In article <3883C97E.8DA692CE@home.com>,
Michael Lefsky <email@example.com> writes:
> I have two questions, one short and direct, one longer and more diffuse.
> 1) Has anyone found a way to keep IDL from either overwriting existing
> idlsave.dat files or not allowing a user to access the save function
> without specifiying a filename? If I had a dollar for every time I had
> to ask my system administrator to restore an old "idlsave.dat" file
> because I had accidently overwritten it, I'd have maybe 4 or 5 bucks.
> Admittdly that's not much, but it is enough to buy my SA a slice of
> pizza, which would go a long way to apologizing for all those
> 2) Is it possible to access main level variables from within a procedure?
> For instance, to solve the problem outlined in 1), you could simply
> write a procedure called "save" which would have precedence over the
> system command save. However, once in the procedure "save", you would no
> longer have access to the main level variables that you want to save.
> Even if you specified them as arguments to "save" you would no longer
> have access to their original (ie. main level) names. There are numerous
> applications for which I would like to be able to somehow get either )
> the names of the variables passed to the current procedure (ie. the
> names they had at the level above them) or to access the main level
> variables. Of course there might be numerous ways to do either of these
> things, from the ugly to the sublime- personally, I am not particular.
> Does anyone have any thoughts on this?
It's not exactly what you describe, but perhaps you could
make use of this routine:
Robert S. Mallozzi 256-544-0887
Mail Code SD 50
http://gammaray.msfc.nasa.gov/ Marshall Space Flight Center
http://cspar.uah.edu/~mallozzir/ Huntsville, AL 35812