>  Docs Center  >  Libraries  >  Markwardt  >  CMSVWRITE

CMSVWRITE

CMSVWRITE

Name


  CMSVWRITE

Author


  Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
  craigm@lheamail.gsfc.nasa.gov

Purpose


  Write a single variable to an open SAVE file

Calling Sequence



  CMSVWRITE, UNIT, DATA [ , NAME=NAME, COMPATIBILITY=COMPAT ]
 

Description



  CMSVWRITE writes a single IDL variable to an open IDL SAVE file.
  The file should already have been opened for writing as a normal
  file using OPENW or OPENU.
  CMSVWRITE is a simplified version of the CMSVLIB package, and as
  such is not capable of writing heap data (pointers) or object
  data, or structures that contain them. Strings, structures, and
  all array types are supported.
  This procedure is part of the CMSVLIB SAVE library for IDL by
  Craig Markwardt. You must have the full CMSVLIB core package
  installed in order for this procedure to function properly.
  ==================================================================
  Research Systems, Inc. has issued a separate license intended
  to resolve any potential conflict between this software and the
  IDL End User License Agreement. The text of that license
  can be found in the file LICENSE.RSI, included with this
  software library.
  ==================================================================

Inputs



  UNIT - the open file unit.
  DATA - the data to be written.

Keywords



  NAME - the optional name of the variable to be written (must be a
          valid variable name).
          Default: CMSVWRITE automatically creates a valid name.
 
  COMPATIBILITY - a string, which describes the format to be used in
          the output file. Possible values are:
                  'IDL4' - format of IDL version 4;
                  'IDL5' - format of IDL versions 5.0-5.3;
                  'IDL6' - not supported yet, for versions 5.4-above;
                  'RIVAL1' - same as 'IDL5'
          Note that files written in IDL5 format may still be
          readable by IDL v.4.
          Default: 'IDL5'
  NO_END - a save file must terminate with an "end" record. By
            default, CMSVWRITE will append such a record after the
            variable is written, and then rewind the file pointer.
            The end record must be written after the last variable,
            but is optional otherwise. Set this keyword to disable
            writing the end record (for performance reasons).
  QUIET - if set, error messages are not printed.
          Default: an error causes errors to be printed with MESSAGE
  STATUS - upon return, this keyword will contain 1 for success and
            0 for failure.
  ERRMSG - upon return with a failure, this keyword will contain the
            error condition as a string.

Example



  Write variables A, B, C and D to a file.
  openw, 50, 'test.sav' ;; Add /STREAM under VMS !
  cmsvwrite, 50, a, name='a'
  cmsvwrite, 50, b, name='b'
  cmsvwrite, 50, c, name='c'
  close, 50

See Also



  CMSVREAD, CMRESTORE, CMSAVE, SAVE, CMSVLIB

Modification History


  Written and documented, 11 Jan 2001, CM
  Make version checks with correct precision, 19 Jul 2001, CM
  Added notification about RSI License, 13 May 2002, CM
  NOTE: remember to modify CMSVLIB.PRO when changing library!
  $Id: cmsvwrite.pro,v 1.12 2009/11/22 22:50:49 craigm Exp $



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us