prtdec |
Table of contents
ProcedurePRTDEC ( Decode a character string ) ENTRY PRTDEC ( STRING, NUMBER ) AbstractDecode a character string encoded by PRTENC. Required_ReadingNone. KeywordsCHARACTER DeclarationsCHARACTER*(*) STRING INTEGER NUMBER Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- STRING I Encoded character string. NUMBER O Decoded number. Detailed_InputSTRING is a character string previously encoded by PRTENC. This contains an integer in base 128 notation, where 128 is a function of the size of the available character set. See PRTENC for details about the format of STRING. Detailed_OutputNUMBER is the integer encoded in the input string. ParametersNone. Exceptions1) If the length of the input string is less than MINLEN, the error SPICE(INSUFFLEN) is signaled. FilesNone. ParticularsPRTDEC is the inverse of PRTENC. In the example below, CALL PRTENC ( I, STRING ) CALL PRTDEC ( STRING, J ) IF ( I .EQ. J ) THEN . . END IF the logical test (I .EQ. J) is always true. This routine is identical to DECHAR, except that this routine does not use the machine-dependent encoding base returned by the SPICELIB routine CHBASE. Instead, the base 128 is used. This base is expected to work on all systems supporting ASCII encoding of characters. ExamplesSee: CARDC, SIZEC. RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) W.L. Taber (JPL) VersionSPICELIB Version 1.1.0, 12-AUG-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. SPICELIB Version 1.0.0, 19-DEC-1995 (NJB) (WLT) |
Fri Dec 31 18:36:40 2021