[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Accessing "main" level variables
- Subject: Accessing "main" level variables
- From: Michael Lefsky <lefsky(at)home.com>
- Date: Tue, 18 Jan 2000 03:01:15 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: @Home Network
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:18052
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?