cmprss |
Table of contents
ProcedureCMPRSS ( Compress a character string ) SUBROUTINE CMPRSS ( DELIM, N, INPUT, OUTPUT ) AbstractCompress a character string by removing occurrences of more than N consecutive occurrences of a specified character. Required_ReadingNone. KeywordsASCII CHARACTER STRING DeclarationsIMPLICIT NONE CHARACTER*1 DELIM INTEGER N CHARACTER*(*) INPUT CHARACTER*(*) OUTPUT Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- DELIM I Delimiter to be compressed. N I Maximum consecutive occurrences of DELIM. INPUT I Input string. OUTPUT O Compressed string. Detailed_InputDELIM is the delimiter to be compressed out of the string. This may be any ASCII character. N is the maximum number of consecutive occurrences of DELIM that will be allowed to remain in the output string. INPUT is the input string. Detailed_OutputOUTPUT is the output string. This is the input string with all occurrences of more than N consecutive delimiters removed. If OUTPUT is not large enough to hold the compressed string, it is truncated on the right. OUTPUT may overwrite INPUT. ParametersNone. ExceptionsError free. 1) If the output string length is too short to contain the result of compressing the input string, the result is truncated on the right. FilesNone. ParticularsOccurrences of more than N consecutive delimiters are removed from the input string as it is copied to the output string. If the output string is not large enough to hold the compressed string, it is truncated on the right. ExamplesLet DELIM = '.', and N = 2. Then 'ABC...DE.F...', becomes 'ABC..DE.F..' ' ...........' ' ..' '.. ..AB....CD' '.. ..AB..CD' Let DELIM = ' ', and N = 0. Then ' DISK:[USER. SUB ]' becomes 'DISK:[USER.SUB]' RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) W.L. Taber (JPL) I.M. Underwood (JPL) VersionSPICELIB Version 1.1.0, 09-JUL-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. Added $Exceptions entry #1. 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, 31-JAN-1990 (WLT) (IMU) |
Fri Dec 31 18:36:05 2021