[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem restoring IDL SAVE files in version 5.3 when created in version 5.4

"Christopher K. Pankratz" <chris.pankratz@lasp.colorado.edu> writes:

> I are attempting to save a variable created in an IDL 5.4 session for
> someone to restore in IDL 5.3, and I are running into some problems.  Here
> is a sample session for creating the save file in IDL 5.4 and restoring it
> in IDL 5.3 which illustrates the problem.
> In IDL 5.4:
> IDL> rec = {a:0.0, b:0L, c:bytarr(200)}
> IDL> save, rec, file='test.sav'
> In IDL 5.3:
> IDL> restore, 'test.sav'
> % RESTORE: Unexpected item code found in save file.
> % Execution halted at:  $MAIN$
> The IDL 5.4 reference manual indicates that saving/restoring data should be
> backward compatible.  It says "Note also that save files containing routines
> may not be compatible between different versions of IDL, but that files
> containing data are always backwards-compatible."  It is my intent not to
> store any information other than the variable of interest, which does happen
> to be a structure.

IDL 5.4 on some platforms creates save files that are not compatible
with older versions of IDL.  This is a "feature" of IDL 5.4 which
originally was intended to allow save files larger than 2 gigabytes.
Unfortunately it also broke backwards compatibility.

I have it on good authority that this will be "fixed" in a forthcoming
version of IDL: fixed in a way that still allows large files, and also
allows older versions of IDL to read.  There will also be a conversion
script to take non-compatible IDL 5.4 files to compatible ones.

In the meantime, you might consider using my CMSAVE library, which
allows reading and writing save files in any recent version of IDL
with very few restrictions.  It's "drop n' load!"


http://cow.physics.wisc.edu/~craigm/idl/idl.html    (under Save files)

Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response