Index of Functions: A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 
Index Page
lbuild

Table of contents
Procedure
Abstract
Required_Reading
Keywords
Declarations
Brief_I/O
Detailed_Input
Detailed_Output
Parameters
Exceptions
Files
Particulars
Examples
Restrictions
Literature_References
Author_and_Institution
Version

Procedure

     LBUILD ( Build a list in a character string )

     SUBROUTINE LBUILD ( ITEMS, N, DELIM, LIST )

Abstract

     Build a list of items delimited by a character.

Required_Reading

     None.

Keywords

     CHARACTER
     LIST
     STRING

Declarations

     IMPLICIT NONE

     CHARACTER*(*)    ITEMS ( * )
     INTEGER          N
     CHARACTER*(*)    DELIM
     CHARACTER*(*)    LIST

Brief_I/O

     VARIABLE  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_Input

     ITEMS    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_Output

     LIST     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.

Parameters

     None.

Exceptions

     Error free.

Files

     None.

Particulars

     The non-blank parts of the elements of the ITEMS array are
     appended to the list, one at a time, separated by DELIM.

Examples

     The 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'

Restrictions

     None.

Literature_References

     None.

Author_and_Institution

     J. Diaz del Rio    (ODC Space)
     W.L. Taber         (JPL)
     I.M. Underwood     (JPL)

Version

    SPICELIB 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