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

Home » Public Forums » archive » Re: resizing system variable
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: resizing system variable [message #82570 is a reply to message #82569] Thu, 20 December 2012 20:33 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Thursday, December 20, 2012 4:44:37 PM UTC-5, astrobo...@gmail.com wrote:
> On Thursday, December 20, 2012 3:28:45 PM UTC-5, Craig Markwardt wrote:
>> It sounds to me you are trying to use a system variable like a common block (i.e. global variable). See if you an rethink how you do it without a system variable, because it will probably come back to bite you.
...
> I have a program that I call in nearly every program I write, that defines about one hundred global variables, such as the date, time, working directory, default color table, etc., using the defsysv command. In any given program I'd use only a handful of these, but I wouldn't necessarily know which ones until the program was finished.
>
> Based on David's books, it seems to me that using a common block in such a case would be a real pain.

Actually, I think that David would argue that system variables are inappropriate for use as global variables for exactly the same reason as common blocks. Global variables can pin you down in painful ways when you try to scale/enhance your program.

[ Don't tell David I mentioned this, but common blocks are actually more flexible than system variables because common block variables can be redefined - even redimensioned whenever you wish. ]

You've got a system that works, I would stick with it now.

When designing a new system, I usually define a structure with all of those quantities and then pass that structure around.

[ Actually, if I were designing my IDL library from scratch, I would start with Python. :-]

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Get values from one image according to pixel locations of maxima on another image
Next Topic: DejaVuSans Font and the Sun Symbol

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

Current Time: Fri Oct 10 15:01:09 PDT 2025

Total time taken to generate the page: 2.07899 seconds