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

Home » Public Forums » archive » Re: Sysvars
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: Sysvars [message #45170] Tue, 16 August 2005 16:42
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Tue, 16 Aug 2005, Reimar Bauer wrote:
> do we have a routine which is able to store all available sysvars
> in a script to a structure (without the need of execute)?
>
> help,result.!x,/str

I do not know of any. I just spent a short while looking into this
and it seems like a tricky problem. I'd be interested in your
solution when (if?) you get one.

You can get a list of all sysvars like this:
help, /sys, out=out

You can get the names and types of the fields of a sysvar (or any
structure) like this:
CALL_PROCEDURE, 'help',names="!CPU", /st, out=fields
and if nothing is returned then you know that the var isn't a
structure (like !PATH or !C)

At this point you can re-create each as a variable/structure that
can be passed into the CREATE_STRUCT used to combine all your
structures. I have code that creates a structure called "all" that
contains substructures of every system variable. This is almost what
you requested.

What I cannot do is populate the values of the re-created structure.
CALL_PROCEDURE, 'help', names='!CPU.HW_NCPU'
returns nothing. It isn't just the structure that causes this problem.
CALL_PROCEDURE, 'help', names='!PATH'
is also silent.

Likewise, SCOPE_VARFETCH('!CPU') won't work to get the values
contained by this structure.


-k.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Problem with INFO definition
Next Topic: Install ENVI/IDL on cygwin

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

Current Time: Wed Oct 08 15:16:15 PDT 2025

Total time taken to generate the page: 0.00463 seconds