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

Home » Public Forums » archive » Naive pointer question ?
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: Naive pointer question ? [message #28972 is a reply to message #28944] Sat, 26 January 2002 13:16 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
btupper@bigelow.org (Ben Tupper) writes:

> On 24 Jan 2002 17:17:02 -0600, Craig Markwardt
> <craigmnet@cow.physics.wisc.edu> wrote:
>
>> I think there are at least two cases where common blocks are
>> pretty nice.
>>
>> The first one is where you need a persistent store of information.
>> For example, CMPS_FORM() keeps a list of printer configurations in a
>> common block. I also keep large tables in a common block, so they are
>> initialized only once to save CPU cycles. Any time you need a
>> procedure to "remember" something from one call to the next, common
>> blocks are actually a pretty good idea.
>>
> Howdy,
>
> While reading Craig's description of this particular 'memory'
> advantage of common blocks, I realized that the word 'object' could be
> slipped into the place of 'common block'. Hmmm.
>
> Objectively yours,

I appreciate that, however, common blocks appear to be the only way to
give a *function* persistent memory. If you use an object or a
pointer instead, you still have to pass this info into the function on
every call. There is indeed a time and a place for that technique,
but I think common blocks can be extremely useful and safe, if used
extremely carefully.

Commonly yours,
Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: TVCRS and Widgets
Next Topic: Re: Question again :)

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

Current Time: Sun Oct 12 06:25:37 PDT 2025

Total time taken to generate the page: 0.48057 seconds