spcdc |
Table of contents
ProcedureSPCDC ( SPK and CK, delete comments ) SUBROUTINE SPCDC ( HANDLE ) AbstractEmpty the comment area of a binary SPK or CK file. Required_ReadingSPC KeywordsFILES DeclarationsIMPLICIT NONE INTEGER HANDLE Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- HANDLE I Handle assigned to binary SPK or CK file. Detailed_InputHANDLE is the handle assigned to the binary SPK or CK file which has been opened for write access. Use the SPICELIB routine DAFOPW to open the file for write access and get HANDLE. Upon exit, this binary file will have an empty comment area: all previous comments are deleted. Note, however, that the size of the file does not change. Detailed_OutputNone. ParametersNone. Exceptions1) If the file does not contain any comments in its comment area on input, it will be unchanged by this routine. FilesSee argument HANDLE. ParticularsThe structure of SPK and CK files accommodates comments in addition to data. The following three routines are available for accessing the comment area of a binary SPK or CK file: SPCAC add comments SPCEC extract comments SPCDC delete comments Note that comments must consist of only text, that is, printable ASCII characters, specifically ASCII 32-126. This excludes tabs (ASCII 9) and control characters. The SPC conversion routines---SPCB2A, SPCA2B, SPCB2T, and SPCT2B---include these comments when converting SPK and CK files between binary and text formats. Examples1) Suppose we have a binary SPK file called A.BSP. The following code fragment deletes any comments that may have been stored in the comment area of the file. CALL DAFOPW ( 'A.BSP', HANDLE ) CALL SPCDC ( HANDLE ) 2) Suppose B.BSP is a binary SPK file with comments in its comment area. The routine TXTOPN opens a new text file. C C Open the binary SPK file with write access and C get its handle. C CALL DAFOPW ( 'B.BSP', HANDLE ) C C Open a new text file and write the comments C from the SPK file to it. C CALL TXTOPN ( 'COMMENTS.TXT', UNIT1 ) CALL SPCEC ( HANDLE, UNIT1 ) C C Delete the comments in the SPK file. C CALL SPCDC ( HANDLE ) C C Open another new text file and try to write C comments from the SPK file to it. C CALL TXTOPN ( 'NOCOMMENTS.TXT', UNIT2 ) CALL SPCEC ( HANDLE, UNIT2 ) After executing this code fragment, COMMENTS.TXT would contain the comments from the SPK file. NOCOMMENTS.TXT would be empty because of the call to SPCDC. RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) J.E. McLean (JPL) W.L. Taber (JPL) VersionSPICELIB Version 1.1.0, 03-JUN-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. Moved the contents of the $Files section to the description of HANDLE in $Detailed_Input section, and referred to it from $Files. SPICELIB Version 1.0.1, 10-MAR-1992 (WLT) Comment section for permuted index source lines was added following the header. SPICELIB Version 1.0.0, 05-APR-1991 (JEM) |
Fri Dec 31 18:36:49 2021