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

Home » Public Forums » archive » Re: variables in common blocks
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: variables in common blocks [message #53866 is a reply to message #53865] Fri, 04 May 2007 08:56 Go to previous messageGo to previous message
lasse is currently offline  lasse
Messages: 48
Registered: February 2007
Member
On 4 May, 16:16, David Fanning <n...@dfanning.com> wrote:
> Lasse Clausen writes:
>> Ok. I'll describe what I am using common blocks for: Whatever day
>> during the week, I am doing one of the following:
>> 1) read data
>> 2) process data
>> 3) plot data
>> Since there are many different ways to process or plot data, it is
>> nice to read the data into common blocks, so that when I decide to
>> process or plot the data differently, I do not have to read it in
>> again.
>
>> If you have an easy solution on how to avoid common blocks, shoot. And
>> why are common blocks bad? Is it the same reason "goto" statements are
>> bad?
>
> Oh, oh. *I* didn't want to get into it. I just wanted
> to light the fire. :-(
>
> OK, there is *nothing* inherently evil about either Common
> blocks or GOTO statements. Both have a purpose, and I have
> used both (I think, although I can't remember a specific
> instance of either).
>
> But what generally makes both Common blocks and GOTO
> statements pernicious is how easy it is for inexperienced
> programmers to substitute them for clear thinking and
> well-written programs. The program I have been working
> on for several weeks was brought to me because it is
> nearly impossible for two "expert" users to get the program
> to run the same way twice in a row, or--sometimes--to
> even run at all. It depends entirely on what order things
> are done and the current phase of the moon. Mostly, this
> is because of the indiscriminate use of Common blocks,
> and the fact that the left hand doesn't always know what the
> right hand is doing.
>
> If I saw a COMMON block in a program written by JD Smith
> or Craig Markwardt, I probably wouldn't even think twice.
> But when I open an e-mail and there is someone pleading for
> "help" and I see Common blocks, I head straight for the
> liquor cabinet.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Ok, agreed. It is not that I am not on your side, it is just that I
use common blocks for the above stated reasons and I cannot think of
any other way of doing it without reading in the data every time I
want to plot it in a different way.

Anyway, have a good weekend.

Cheers
Lasse
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: limited angle CT
Next Topic: IDL number output format problem?

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

Current Time: Sun Oct 12 13:28:22 PDT 2025

Total time taken to generate the page: 2.88206 seconds