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

Home » Public Forums » archive » Re: Changing common variable definition
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: Changing common variable definition [message #2561 is a reply to message #2560] Tue, 26 July 1994 04:52 Go to previous message
tai is currently offline  tai
Messages: 14
Registered: June 1994
Junior Member
Matthew Larkum (larkum@optolab.unibe.ch) wrote:
: common my_vars, x, y
: and then add a variable:
: common my_vars, x, y, z
: and recompile, I get an error:
: % Attemp to extend previously defined common: MY_VARS
: Is there any way to redefine a common variable?

No, your common block definitions must all be the same (ala Fortran).
If you're using IDL version 3.6, you can just do the following:

common my_vars, x, y
...
common my_vars

If you're using an earlier version, my suggestion is to go with an
@include_file.

main program:
@globals.pro
...
@globals.pro

globals.pro:
common my_vars, x, y

Hope this helps.


Alan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: REQ: Color Selection Tool
Next Topic: Finding common elements in two arrays

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

Current Time: Sun Oct 12 13:44:09 PDT 2025

Total time taken to generate the page: 0.32510 seconds