rmdupc |
Table of contents
ProcedureRMDUPC ( Remove duplicates from a character array ) SUBROUTINE RMDUPC ( NELT, ARRAY ) AbstractRemove duplicate elements from a character array. Required_ReadingNone. KeywordsARRAY DeclarationsIMPLICIT NONE INTEGER NELT CHARACTER*(*) ARRAY (*) Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- NELT I-O Number of elements in the array. ARRAY I-O Input/output array. Detailed_InputNELT on input is the number of elements in the input array. ARRAY on input contains zero or more elements, from which all duplicate elements are to be removed. Detailed_OutputNELT on output is the number of elements in the output array. ARRAY on output contains the distinct elements of the input array, sorted in increasing order. (Character arrays are sorted according to the ASCII collating sequence). ParametersNone. ExceptionsError free. FilesNone. ParticularsNone. ExamplesLet the arrays C and I contain the following elements. NC = 7 NI = 5 C(1) = 'Miranda' I(1) = 13 C(2) = 'Ariel' I(2) = -13 C(3) = 'Umbriel' I(3) = 0 C(4) = 'Titania' I(4) = 1 C(5) = 'Miranda' I(5) = 0 C(6) = 'Oberon' C(7) = 'Umbriel' Then following the calls CALL RMDUPC ( NC, C ) CALL RMDUPI ( NI, I ) C and I contain the following. NC = 5 NI = 4 C(1) = 'Ariel' I(1) = -13 C(2) = 'Miranda' I(2) = 0 C(3) = 'Oberon' I(3) = 1 C(4) = 'Titania' I(4) = 13 C(5) = 'Umbriel' RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) W.L. Taber (JPL) I.M. Underwood (JPL) VersionSPICELIB Version 1.1.0, 05-JUN-2021 (JDR) Added IMPLICIT NONE statement. Edited the header to comply with NAIF standard. 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 (IMU) |
Fri Dec 31 18:36:43 2021