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 #53871 is a reply to message #53866] Fri, 04 May 2007 08:36 Go to previous messageGo to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Fri, 4 May 2007, Lasse Clausen wrote:

> why are common blocks bad?


They is an area where they are really useful: preserving the state of a
user routine (like static local variables in C/C++):

pro mypro
common mypro_state, a, b, c

if size(a, /type) eq 0 then begin
; first call, initialize
endif

...

end


regards,
lajos
[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: Sat Nov 29 08:53:57 PST 2025

Total time taken to generate the page: 0.72083 seconds