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

Home » Public Forums » archive » elementary SAVE and COMMON BLOCKS
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
elementary SAVE and COMMON BLOCKS [message #56463] Tue, 30 October 2007 18:13
Libertan is currently offline  Libertan
Messages: 8
Registered: February 2007
Junior Member
I have a very basic problem. I can't seem to save common blocks.
Having read the documentation and tried SAVE with all its options (and
permutations of them) I have still had no luck. I am, to be honest,
completely stymied.

Take for example,

PRO main
common DATA, a
a=9
save, /ALL, filename='junk.sav'
END

As I understand it, this should save the DATA common block which
contains the variable A.

PRO check
restore, 'junk.sav'
help
END

This should reveal that A is in DATA. I used procedures to ensure the
common block is destroyed before restore is invoked. i suppose
resetting idl at the half way point would also work.

Anyway, I find that A is saved as a local variable and there's no sign
of the existence of the DATA common block. I've tried HELP, the
bottom panel of the IDLDE GUI and the object method IDL_Savefile, all
of which have confirmed that junk.sav contains no common blocks.

Furthermore, and very confusingly, it seems I can't compile IDL
procedures which reference DATA without DATA being previously defined
in one of them. This seems to preclude the possibility of loading a
common block of unknown size/contents. If common blocks always have
to be explicitly defined, then what's the point in saving a common
block? You might as well just save the variables.

A million thanks in advance.
TSL
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: plotting data on lat/lon map
Next Topic: IDL and IDL-PVWAVE disambiguation

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

Current Time: Sat Oct 11 14:15:51 PDT 2025

Total time taken to generate the page: 0.80295 seconds