lbuild |
Table of contents
ProcedureLBUILD ( Build a list in a character string ) SUBROUTINE LBUILD ( ITEMS, N, DELIM, LIST ) AbstractBuild a list of items delimited by a character. Required_ReadingNone. KeywordsCHARACTER LIST STRING DeclarationsIMPLICIT NONE CHARACTER*(*) ITEMS ( * ) INTEGER N CHARACTER*(*) DELIM CHARACTER*(*) LIST Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- ITEMS I Items in the list. N I Number of items in the list. DELIM I String used to delimit items. LIST O List of items delimited by DELIM. Detailed_InputITEMS are the items to be combined to make the output list. Leading and trailing blanks are ignored. (Only the non-blank parts of the items are used.) N is the number of items. DELIM is the string used to delimit the items in the output list. DELIM may contain any number of characters, including blanks. Detailed_OutputLIST is the output list, containing the N elements of ITEMS delimited by DELIM. If LIST is not long enough to contain the output list, it is truncated on the right. ParametersNone. ExceptionsError free. FilesNone. ParticularsThe non-blank parts of the elements of the ITEMS array are appended to the list, one at a time, separated by DELIM. ExamplesThe following examples illustrate the operation of LBUILD. 1) Let DELIM = ' ' ITEMS(1) = 'A' ITEMS(2) = ' number' ITEMS(3) = 'of' ITEMS(4) = ' words' ITEMS(5) = 'separated' ITEMS(6) = ' by' ITEMS(7) = 'spaces' Then LIST = 'A number of words separated by spaces' 2) Let DELIM = '/' ITEMS(1) = ' ' ITEMS(2) = ' ' ITEMS(3) = 'option1' ITEMS(4) = ' ' ITEMS(5) = 'option2' ITEMS(6) = ' ' ITEMS(7) = ' ' ITEMS(8) = ' ' Then LIST = '//option1//option2///' 3) Let DELIM = ' and ' ITEMS(1) = 'Bob' ITEMS(2) = 'Carol' ITEMS(3) = 'Ted' ITEMS(4) = 'Alice' Then LIST = 'Bob and Carol and Ted and Alice' RestrictionsNone. Literature_ReferencesNone. Author_and_InstitutionJ. Diaz del Rio (ODC Space) W.L. Taber (JPL) I.M. Underwood (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.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:30 2021