| dafwdr |
|
Table of contents
Procedure
DAFWDR ( DAF, write double precision record )
ENTRY DAFWDR ( HANDLE, RECNO, DREC )
Abstract
Write or rewrite the contents of a double precision record in
a DAF.
Required_Reading
DAF
Keywords
FILES
Declarations
INTEGER HANDLE
INTEGER RECNO
DOUBLE PRECISION DREC ( 128 )
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
HANDLE I Handle of DAF.
RECNO I Record number.
DREC I Contents of record.
Detailed_Input
HANDLE is the handle associated with a DAF.
RECNO is the record number of a particular double
precision record within the file, whose
contents are to be written (if the record does
not yet exist) or overwritten (if it does).
DREC contains the new contents of the record.
Detailed_Output
None.
Parameters
None.
Exceptions
1) If the file is not open for write access, the error
SPICE(DAFILLEGWRITE) is signaled.
2) If (for some reason) the record cannot be written, the
error SPICE(DAFDPWRITEFAIL) is signaled.
Files
None.
Particulars
Like DAFRDR, DAFWDR checks the record buffer to see if the
requested record is in the buffer. If so, the buffer is
updated along with the file. This prevents the buffer from
becoming outdated.
Examples
The following code fragment illustrates one way that DAFRDR
and DAFWDR can be used to update part of a double precision
record. If the record does not yet exist, we can assume that
it is filled with zeros.
CALL DAFRDR ( HANDLE, RECNO, DREC, FOUND )
IF ( .NOT. FOUND ) THEN
CALL MOVED ( 0.D0, 128, DREC )
END IF
DO I = FIRST, LAST
DREC(I) = NEW_VALUE(I)
END DO
CALL DAFWDR ( HANDLE, RECNO, DREC )
Restrictions
None.
Literature_References
None.
Author_and_Institution
N.J. Bachman (JPL)
J. Diaz del Rio (ODC Space)
J.M. Lynch (JPL)
H.A. Neilan (JPL)
W.L. Taber (JPL)
F.S. Turner (JPL)
I.M. Underwood (JPL)
Version
SPICELIB Version 2.0.1, 09-AUG-2021 (NJB) (JDR)
Re-ordered header sections. Corrected typos in comments.
Edited the header to comply with NAIF standard.
Removed DAF required reading from $Literature_References.
SPICELIB Version 2.0.0, 16-NOV-2001 (FST)
Replaced the call to DAFHLU to ZZDDHHLU. This prevents
DAFWDR from tying up resources in the handle manager.
SPICELIB Version 1.3.0, 24-MAR-2000 (WLT)
The loop in DAFRDR that moved buffered d.p.s into the output
array DATA was modified to use the routine MOVED.
SPICELIB Version 1.1.0, 25-NOV-1992 (JML)
In the example code fragment in DAFRDR and DAFWDR, the
calling sequence to MOVED was corrected.
SPICELIB Version 1.0.2, 10-MAR-1992 (WLT)
Comment section for permuted index source lines was added
following the header.
SPICELIB Version 1.0.1, 22-MAR-1990 (HAN)
Literature references added to the header.
SPICELIB Version 1.0.0, 31-JAN-1990 (IMU)
|
Fri Dec 31 18:36:09 2021