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

Home » Public Forums » archive » screwy system variables !? [2]
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: screwy system variables !? [2] [message #6698 is a reply to message #6602] Fri, 26 July 1996 00:00 Go to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Chris Chase SRM (chase@custer.jhuapl.edu) wrote:
: >>>>> "Chad" == Chad Trujillo <trujillo@xnmusc.mit.edu> writes:
: In article <4t71d3$lhe@senator-bedfellow.MIT.EDU> trujillo@xnmusc.mit.edu (Chad Trujillo) writes:


: Chad> (Had some posting problems on the first one)
: Chad> It seems like I can't actually create new system variables in a
: Chad> function or program and use them later in that same function/program.
: Chad> For example, I have the following program (in file tester.pro):
: >> pro tester
: >> defsysv, "!tester", 222
: >> print, !tester ;this line directly refers to !tester
: >> end

: Chad> When I try to compile/run it, I get the following error (unless I
: Chad> manually define !tester at the command line first):
: >> % Not a legal system variable: !TESTER.

: The problem is that IDL creates references to variables at compile
: time, but the system variable !tester does not exist at compile time.
: It will not exist until the defsysv is executed at runtime.

: You will either need to perform the defsysv in another procedure that
: runs before this one is compiled or, as suggested by someone else, use
: an execute() statement wherever you reference the !tester (effectively
: execute() delays compilation until run time).

Does anybody regularly use system variables this way? Why? Why not a
regular variable in a common block?

Peter
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: screwy system variables !?
Next Topic: a BUG or not a BUG in IDL ?

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

Current Time: Fri Oct 10 01:19:05 PDT 2025

Total time taken to generate the page: 2.15963 seconds